diff options
author | Rico Antonio Felix <ricoantoniofelix@yahoo.com> | 2015-06-21 10:26:01 -0400 |
---|---|---|
committer | Rico Antonio Felix <ricoantoniofelix@yahoo.com> | 2015-06-21 10:26:01 -0400 |
commit | adff07c8fc97bf154903ba25bfbfab9df3daae6a (patch) | |
tree | 6cbd280ae011b544233997ccbe09ef656b551f6b /include | |
parent | 4074e5fc5614e6545e6b56ceb4fc2275c06d174e (diff) |
Refactored operator-=(X&, Php::Value) to use C++ style cast to clarify
intent
Diffstat (limited to 'include')
-rw-r--r-- | include/value.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/value.h b/include/value.h index 12f0c4d..96f4488 100644 --- a/include/value.h +++ b/include/value.h @@ -1238,7 +1238,7 @@ PHPCPP_EXPORT std::ostream &operator<<(std::ostream &stream, const Value &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 += 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; } +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> |