summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-06-23 16:07:28 +0200
committerEmiel Bruijntjes <emiel.bruijntjes@copernica.com>2015-06-23 16:07:28 +0200
commit1d4285325a5feeec927de1785fc7a9125f607fba (patch)
tree0909b77a42c0f5797cf7df93d2ae1da0f62683cf
parentceac7c034aab703772231ea3b8375abec67cd3d9 (diff)
parent0f3591391a4bec63318180977f05f1a2df606698 (diff)
Merge branch 'master' of https://github.com/CopernicaMarketingSoftware/PHP-CPP
-rw-r--r--include/inivalue.h14
-rw-r--r--include/namespace.h2
-rw-r--r--include/value.h10
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