summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorljfa-ag <ljfa-ag@web.de>2015-07-04 10:04:45 +0200
committerljfa-ag <ljfa-ag@web.de>2015-07-04 10:04:45 +0200
commitcdcbcd5adf8b987baaf602450d129afcf4d8fdf7 (patch)
tree45cae6e500ff9034efca3e0bb85b18e60c4060e0 /include
parent36c1393a5682a7cab500d3f0ca2cb45ddb0a844f (diff)
downloadProject-Tick-cdcbcd5adf8b987baaf602450d129afcf4d8fdf7.tar.gz
Project-Tick-cdcbcd5adf8b987baaf602450d129afcf4d8fdf7.zip
Implement value_initializer
Diffstat (limited to 'include')
-rw-r--r--include/tag_compound.h2
-rw-r--r--include/value_initializer.h5
2 files changed, 4 insertions, 3 deletions
diff --git a/include/tag_compound.h b/include/tag_compound.h
index 3c68fc1b12..ea0df236c9 100644
--- a/include/tag_compound.h
+++ b/include/tag_compound.h
@@ -43,7 +43,7 @@ public:
///Constructs an empty compound
tag_compound() {}
- tag_compound(std::initializer_list<std::pair<std::string, value_initializer&&>> init);
+ tag_compound(std::initializer_list<std::pair<std::string, value_initializer>> init);
/**
* @brief Accesses a tag by key with bounds checking
diff --git a/include/value_initializer.h b/include/value_initializer.h
index 86fdd2d1e1..7ae2cb13f4 100644
--- a/include/value_initializer.h
+++ b/include/value_initializer.h
@@ -47,10 +47,11 @@ public:
value_initializer(std::string&& str);
value_initializer(const char* str);
- operator value&&();
+ value& get() const;
private:
- value val;
+ mutable value value_; //FIXME: std::initializer_list objects are constant.
+ //This solution will probably fail
};
}