summaryrefslogtreecommitdiff
path: root/include/value.h
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-27 16:32:58 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2014-07-27 16:32:58 +0200
commitfdc51fb439cb421424f54eb618b0e74359abd93c (patch)
treed9b80d84a31dae4ad3319a856e7f71f170204ba7 /include/value.h
parent5cf1b5d53db6ddeb4b8d371baef0d9c37c0fa231 (diff)
parent6dba54f21a1972d0558299c865c03dcb3371d0b9 (diff)
Merge branch 'fixed#107' of https://github.com/andot/PHP-CPP
Diffstat (limited to 'include/value.h')
-rw-r--r--include/value.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/value.h b/include/value.h
index 853be96..fe28e6d 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;