From cc106471bee34549d0db18a6d3797e791853fc6c Mon Sep 17 00:00:00 2001 From: Toon Schoenmakers Date: Tue, 19 Aug 2014 11:07:37 +0200 Subject: Use stringValue() rather than checking if it's a numeric value to then use std::to_string() --- zend/value.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'zend') diff --git a/zend/value.cpp b/zend/value.cpp index 3f38498..50c4b64 100644 --- a/zend/value.cpp +++ b/zend/value.cpp @@ -1708,15 +1708,10 @@ std::map Value::mapValue() const { // result variable std::map result; - + // iterate over the object - for (auto &iter : *this) - { - auto &key = iter.first; - if (key.isNumeric()) result[std::to_string(key.numericValue())] = iter.second; - else result[iter.first.rawValue()] = iter.second; - } - + for (auto &iter : *this) result[iter.first.stringValue()] = iter.second; + // done return result; } -- cgit v1.2.3