From 38833205e4011a8a318b8dc6809621a89ad9f446 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 29 Aug 2012 23:19:09 -0700 Subject: Using true C++11 initializers in classes. --- includes/SimpleMustache.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'includes/SimpleMustache.h') 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 SubContext; typedef std::vector ContextList; ContextList m_contextList; - bool m_root; + bool m_root = true; void empty(bool skipFirst = false); void ensureList(bool single = false); -- cgit v1.2.3