summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2011-11-29 16:53:01 -0800
committerPixel <pixel@nobis-crew.org>2011-11-29 16:53:01 -0800
commit47dc3dd1a91dccc72e86e930b9a098ffbe10ff1a (patch)
tree87c3324bff20a17e7aa76dd8c95c9cffcbedf014
parenta0486e27504338dc6ce65fdecfce2cc4caabd8e1 (diff)
Removing a few operators that aren't used anymore, and adding a better =(String) operator.
-rw-r--r--includes/SimpleMustache.h8
1 files changed, 6 insertions, 2 deletions
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;