summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRico Antonio Felix <ricoantoniofelix@yahoo.com>2015-06-21 10:25:03 -0400
committerRico Antonio Felix <ricoantoniofelix@yahoo.com>2015-06-21 10:25:03 -0400
commit4074e5fc5614e6545e6b56ceb4fc2275c06d174e (patch)
tree28a20567e0e01c16f32699dde0d547b2763e3b6b
parentdadcaaca9d39e1c0f08eca163fb36cc483ded582 (diff)
Refactored operator+=(X&, Php::Value) to use C++ style cast to clarify
intent
-rw-r--r--include/value.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/value.h b/include/value.h
index 8b5c72b..12f0c4d 100644
--- a/include/value.h
+++ b/include/value.h
@@ -1236,7 +1236,7 @@ PHPCPP_EXPORT std::ostream &operator<<(std::ostream &stream, const Value &value)
* (arrays, objects, etc)
*/
template <typename X, typename std::enable_if<std::is_integral<X>::value>::type* = nullptr>
-X &operator+=(X &x, const Php::Value &value) { return x += (X)value; }
+X &operator+=(X &x, const Php::Value &value) { return x += static_cast<X>(value); }
template <typename X, typename std::enable_if<std::is_integral<X>::value>::type* = nullptr>
X &operator-=(X &x, const Php::Value &value) { return x -= (X)value; }
template <typename X, typename std::enable_if<std::is_integral<X>::value>::type* = nullptr>