summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorandot <mabingyao@gmail.com>2014-07-10 13:44:38 +0800
committerandot <mabingyao@gmail.com>2014-07-10 13:44:38 +0800
commit6dba54f21a1972d0558299c865c03dcb3371d0b9 (patch)
treec623183cb0f1b2b3b88007cc355cb94eb19f32c9 /include
parent28578382589dab25ea5fbd35b7754687706abc07 (diff)
Fixed issue #107
Diffstat (limited to 'include')
-rw-r--r--include/value.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/value.h b/include/value.h
index f72304c..8eac394 100644
--- a/include/value.h
+++ b/include/value.h
@@ -100,7 +100,7 @@ public:
* @param value
*/
template <typename T>
- Value(const std::map<std::string,T> &value)
+ Value(const std::map<std::string,T> &value) : Value(Type::Array)
{
// set all elements
for (auto &iter : value) setRaw(iter.first.c_str(), iter.first.size(), iter.second);
@@ -502,6 +502,8 @@ public:
// result variable
std::map<std::string,T> result;
+
+ for (auto &iter : map) result[iter.first] = iter.second;
// done
return result;