From caa31ea180b34f05e571c8a4ff229389b5234c75 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 18:38:20 -0400 Subject: Corrected API documentation --- include/inivalue.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/inivalue.h b/include/inivalue.h index 9afb1a2..349a5c7 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -26,8 +26,8 @@ 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 { -- cgit v1.2.3 From ca12ab6eeb8306af0eb1ee232c8de5db2f6c674f Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 19:14:21 -0400 Subject: Refactored cast to int16_t to use C++ style cast to clarify intent --- include/inivalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index 349a5c7..a894fb5 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -31,7 +31,7 @@ public: */ operator int16_t () const { - return (int16_t)numericValue(); + return static_cast(numericValue()); } /** -- cgit v1.2.3 From 4e59e019c3c42954e6c32815efb16283c042c1ce Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 19:15:43 -0400 Subject: Enhanced API Documentation --- include/inivalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index a894fb5..a539e54 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -35,7 +35,7 @@ public: } /** - * Cast to a number + * Cast to a 32-bit number * @return int32_t */ operator int32_t () const -- cgit v1.2.3 From 403c50efd156bd1eaf02cac0e42fa5f706390335 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 19:16:45 -0400 Subject: Refactored cast to int32_t to use C++ style cast to clarify intent --- include/inivalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index a539e54..6e5091b 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -40,7 +40,7 @@ public: */ operator int32_t () const { - return (int32_t)numericValue(); + return static_cast(numericValue()); } /** -- cgit v1.2.3 From 832fa7abddeb48ac8f59e1dc4e082786ca7a1b7e Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 19:17:40 -0400 Subject: Enhanced API Documentation --- include/inivalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index 6e5091b..da6b688 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -44,7 +44,7 @@ public: } /** - * Cast to a number + * Cast to a 64-bit number * @return uint64_t */ operator int64_t () const -- cgit v1.2.3 From 917c7f7fd431f79250ea6e1c5d967076d09b2001 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sat, 20 Jun 2015 19:22:13 -0400 Subject: Refactored IniValue::boolValue to use C++ style cast to clarify intent --- include/inivalue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/inivalue.h b/include/inivalue.h index da6b688..8c94576 100644 --- a/include/inivalue.h +++ b/include/inivalue.h @@ -103,7 +103,7 @@ public: */ bool boolValue() const { - return (bool)numericValue(); + return static_cast(numericValue()); } /** -- cgit v1.2.3 From dadcaaca9d39e1c0f08eca163fb36cc483ded582 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:07:48 -0400 Subject: Corrected API Documentation --- include/namespace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit v1.2.3 From 4074e5fc5614e6545e6b56ceb4fc2275c06d174e Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:25:03 -0400 Subject: Refactored operator+=(X&, Php::Value) to use C++ style cast to clarify intent --- include/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ::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(value); } template ::value>::type* = nullptr> X &operator-=(X &x, const Php::Value &value) { return x -= (X)value; } template ::value>::type* = nullptr> -- cgit v1.2.3 From adff07c8fc97bf154903ba25bfbfab9df3daae6a Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:26:01 -0400 Subject: Refactored operator-=(X&, Php::Value) to use C++ style cast to clarify intent --- include/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ::value>::type* = nullptr> X &operator+=(X &x, const Php::Value &value) { return x += static_cast(value); } template ::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(value); } template ::value>::type* = nullptr> X &operator*=(X &x, const Php::Value &value) { return x *= (X)value; } template ::value>::type* = nullptr> -- cgit v1.2.3 From 84957742b8f84e8590bd9372c5a9e02256dfa669 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:26:45 -0400 Subject: Refactored operator*=(X&, Php::Value) to use C++ style cast to clarify intent --- include/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/value.h b/include/value.h index 96f4488..e3050fb 100644 --- a/include/value.h +++ b/include/value.h @@ -1240,7 +1240,7 @@ X &operator+=(X &x, const Php::Value &value) { return x += static_cast(value) template ::value>::type* = nullptr> X &operator-=(X &x, const Php::Value &value) { return x -= static_cast(value); } template ::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(value); } template ::value>::type* = nullptr> X &operator/=(X &x, const Php::Value &value) { return x /= (X)value; } template ::value>::type* = nullptr> -- cgit v1.2.3 From 2adbf6048ad3f0819f85de768dbdbaea77f69ee8 Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:27:34 -0400 Subject: Refactored operator/=(X&, Php::Value) to use C++ style cast to clarify intent --- include/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/value.h b/include/value.h index e3050fb..f229903 100644 --- a/include/value.h +++ b/include/value.h @@ -1242,7 +1242,7 @@ X &operator-=(X &x, const Php::Value &value) { return x -= static_cast(value) template ::value>::type* = nullptr> X &operator*=(X &x, const Php::Value &value) { return x *= static_cast(value); } template ::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(value); } template ::value>::type* = nullptr> X &operator%=(X &x, const Php::Value &value) { return x %= (X)value; } -- cgit v1.2.3 From 24d40fb895b384c728213afd524a16d250148a0d Mon Sep 17 00:00:00 2001 From: Rico Antonio Felix Date: Sun, 21 Jun 2015 10:28:18 -0400 Subject: Refactored operator%=(X&, Php::Value) to use C++ style cast to clarify intent --- include/value.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/value.h b/include/value.h index f229903..e61750b 100644 --- a/include/value.h +++ b/include/value.h @@ -1244,7 +1244,7 @@ X &operator*=(X &x, const Php::Value &value) { return x *= static_cast(value) template ::value>::type* = nullptr> X &operator/=(X &x, const Php::Value &value) { return x /= static_cast(value); } template ::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(value); } /** * End of namespace -- cgit v1.2.3