diff options
author | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2012-08-29 23:19:09 -0700 |
---|---|---|
committer | Nicolas "Pixel" Noble <pixel@nobis-crew.org> | 2012-08-29 23:48:58 -0700 |
commit | 38833205e4011a8a318b8dc6809621a89ad9f446 (patch) | |
tree | eb1c8c8a4b9b6a9718b87df5cf13832ba0fecf68 /includes/SimpleMustache.h | |
parent | 3f1b0920d697afff0f3e938cb7eca0aacfd75a91 (diff) |
Using true C++11 initializers in classes.
Diffstat (limited to 'includes/SimpleMustache.h')
-rw-r--r-- | includes/SimpleMustache.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/includes/SimpleMustache.h b/includes/SimpleMustache.h index 2bb0cb1..9d16377 100644 --- a/includes/SimpleMustache.h +++ b/includes/SimpleMustache.h @@ -22,7 +22,7 @@ class SimpleMustache { friend class Context; }; - Context() : m_type(CONTEXTLIST), m_root(true) { } + Context() { } ~Context() { empty(); } Proxy operator[](ssize_t idx) { ensureList(); return Proxy(this, idx); } Context & operator[](const char * str); @@ -55,7 +55,7 @@ class SimpleMustache { BOOLSEC, CONTEXTLIST, LAMBDA, - } m_type; + } m_type = CONTEXTLIST; Context(ContextType type) : m_type(type), m_root(false) { } Context(Context & c) { Failure("You can't copy a Context; use references"); } Context & operator=(Context & c) { Failure("You can't assign a Context; use references"); return *this; } @@ -64,7 +64,7 @@ class SimpleMustache { typedef std::map<String, Context *> SubContext; typedef std::vector<SubContext> ContextList; ContextList m_contextList; - bool m_root; + bool m_root = true; void empty(bool skipFirst = false); void ensureList(bool single = false); |