From 47dc3dd1a91dccc72e86e930b9a098ffbe10ff1a Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 29 Nov 2011 16:53:01 -0800 Subject: Removing a few operators that aren't used anymore, and adding a better =(String) operator. --- includes/SimpleMustache.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'includes/SimpleMustache.h') diff --git a/includes/SimpleMustache.h b/includes/SimpleMustache.h index 66db3ca..b16f683 100644 --- a/includes/SimpleMustache.h +++ b/includes/SimpleMustache.h @@ -15,8 +15,6 @@ class SimpleMustache { class Proxy { public: Context & operator[](const char * str); - Context & operator=(const char * str); - Context & operator=(bool b); private: Proxy(Context * parent, ssize_t idx) : m_parent(parent), m_idx(idx) { } Context * m_parent; @@ -32,6 +30,12 @@ class SimpleMustache { // Something tells me they need some design love, especially about which // context they use. The specification says they should expand the tags, // but the example doesn't show a function that'd take a context... + Context & operator=(const String & str) { + empty(); + m_type = STRING; + m_str = str; + return *this; + } Context & operator=(const char * str) { empty(); m_type = STRING; -- cgit v1.2.3