summaryrefslogtreecommitdiff
path: root/core/variant_parser.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant_parser.h')
-rw-r--r--core/variant_parser.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/core/variant_parser.h b/core/variant_parser.h
index 63ed51bcc9..b55d7b2df0 100644
--- a/core/variant_parser.h
+++ b/core/variant_parser.h
@@ -38,45 +38,40 @@
class VariantParser {
public:
struct Stream {
-
virtual CharType get_char() = 0;
virtual bool is_utf8() const = 0;
virtual bool is_eof() const = 0;
- CharType saved;
+ CharType saved = 0;
- Stream() :
- saved(0) {}
+ Stream() {}
virtual ~Stream() {}
};
struct StreamFile : public Stream {
-
- FileAccess *f;
+ FileAccess *f = nullptr;
virtual CharType get_char();
virtual bool is_utf8() const;
virtual bool is_eof() const;
- StreamFile() { f = nullptr; }
+ StreamFile() {}
};
struct StreamString : public Stream {
-
String s;
- int pos;
+ int pos = 0;
virtual CharType get_char();
virtual bool is_utf8() const;
virtual bool is_eof() const;
- StreamString() { pos = 0; }
+ StreamString() {}
};
typedef Error (*ParseResourceFunc)(void *p_self, Stream *p_stream, Ref<Resource> &r_res, int &line, String &r_err_str);
struct ResourceParser {
-
void *userdata = nullptr;
ParseResourceFunc func;
ParseResourceFunc ext_func;
@@ -113,13 +108,11 @@ public:
};
struct Token {
-
TokenType type;
Variant value;
};
struct Tag {
-
String name;
Map<String, Variant> fields;
};