diff options
author | Martijn Otto <martijn.otto@copernica.com> | 2015-06-23 15:42:53 +0200 |
---|---|---|
committer | Martijn Otto <martijn.otto@copernica.com> | 2015-06-23 15:42:53 +0200 |
commit | 0f3591391a4bec63318180977f05f1a2df606698 (patch) | |
tree | d4173d9b465980c920b981987acaf6ede7f41dc4 | |
parent | 01990e0f64aac57050a00c0f41fbd0ef2a5d0ad3 (diff) | |
parent | 24d40fb895b384c728213afd524a16d250148a0d (diff) |
Merge pull request #202 from RicoAntonioFelix/master
Minor Corrections and Enhancements to Code Base
-rw-r--r-- | include/inivalue.h | 14 | ||||
-rw-r--r-- | include/namespace.h | 2 | ||||
-rw-r--r-- | include/value.h | 10 |
3 files changed, 13 insertions, 13 deletions
diff --git a/include/inivalue.h b/include/inivalue.h index 9afb1a2..8c94576 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -26,25 +26,25 @@ public: IniValue(const char *name, const bool isorig) : _name(name), _isorig(isorig) {} /** - * Cast to a number - * @return int32_t + * Cast to a 16-bit number + * @return int16_t */ operator int16_t () const { - return (int16_t)numericValue(); + return static_cast<int16_t>(numericValue()); } /** - * Cast to a number + * Cast to a 32-bit number * @return int32_t */ operator int32_t () const { - return (int32_t)numericValue(); + return static_cast<int32_t>(numericValue()); } /** - * Cast to a number + * Cast to a 64-bit number * @return uint64_t */ operator int64_t () const @@ -103,7 +103,7 @@ public: */ bool boolValue() const { - return (bool)numericValue(); + return static_cast<bool>(numericValue()); } /** diff --git a/include/namespace.h b/include/namespace.h index d31731c..388f2b9 100644 --- a/include/namespace.h +++ b/include/namespace.h @@ -64,7 +64,7 @@ protected: * time, but the classes, functions and namespaces will then not be * filled. * - * @var bool + * @return bool */ virtual bool locked() const { diff --git a/include/value.h b/include/value.h index 8b5c72b..e61750b 100644 --- a/include/value.h +++ b/include/value.h @@ -1236,15 +1236,15 @@ 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; } +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; } +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); } /** * End of namespace |