Permalink
Browse files

Moved some private constants to the cpp file

Those private constants cluttered the header file and were only used in the cpp file.
  • Loading branch information...
1 parent 81832ce commit c2f541d143df82467c2566fb0ee4a8d4db96df5e @madbranch madbranch committed Apr 4, 2015
Showing with 41 additions and 46 deletions.
  1. +0 −42 include/JsonBox/Value.h
  2. +41 −4 src/Value.cpp
@@ -608,48 +608,6 @@ namespace JsonBox {
};
/**
- * Empty string returned by getString() when the value doesn't contain a
- * string.
- * @see JsonBox::Value::getString
- */
- static const std::string EMPTY_STRING;
-
- /**
- * Default int value returned by getInteger() when the value doesn't contain
- * an integer.
- * @see JsonBox::Value::getInt
- */
- static const int EMPTY_INT = 0;
-
- /**
- * Default double value returned by getDouble() when the value doesn't
- * contain a double.
- * @see JsonBox::Value::getDouble
- */
- static const double EMPTY_DOUBLE;
-
- /**
- * Default empty object value returned by getObject() when the value
- * doesn't contain an object.
- * @see JsonBox::Value::getObject
- */
- static const Object EMPTY_OBJECT;
-
- /**
- * Default empty array value returned by getArray() when the value
- * doesn't contain an array.
- * @see JsonBox::Value::getArray
- */
- static const Array EMPTY_ARRAY;
-
- /**
- * Default boolean value returned by getBoolean() when the value doesn't
- * contain a boolean.
- * @see JsonBox::Value::getBoolean
- */
- static const bool EMPTY_BOOL = false;
-
- /**
* Checks if the char given is a hex digit.
* @return True if the char contains an hexadecimal digit (0-9, a-f or
* A-F).
View
@@ -19,10 +19,47 @@
namespace JsonBox {
- const std::string Value::EMPTY_STRING = std::string();
- const double Value::EMPTY_DOUBLE = 0.0;
- const Object Value::EMPTY_OBJECT = Object();
- const Array Value::EMPTY_ARRAY = Array();
+ /**
+ * Empty string returned by getString() when the value doesn't contain a
+ * string.
+ * @see JsonBox::Value::getString
+ */
+ static const std::string EMPTY_STRING = std::string();
+
+ /**
+ * Default int value returned by getInteger() when the value doesn't contain
+ * an integer.
+ * @see JsonBox::Value::getInt
+ */
+ static const int EMPTY_INT = 0;
+
+ /**
+ * Default double value returned by getDouble() when the value doesn't
+ * contain a double.
+ * @see JsonBox::Value::getDouble
+ */
+ static const double EMPTY_DOUBLE = 0.0;
+
+ /**
+ * Default empty object value returned by getObject() when the value
+ * doesn't contain an object.
+ * @see JsonBox::Value::getObject
+ */
+ static const Object EMPTY_OBJECT = Object();
+
+ /**
+ * Default empty array value returned by getArray() when the value
+ * doesn't contain an array.
+ * @see JsonBox::Value::getArray
+ */
+ static const Array EMPTY_ARRAY = Array();
+
+ /**
+ * Default boolean value returned by getBoolean() when the value doesn't
+ * contain a boolean.
+ * @see JsonBox::Value::getBoolean
+ */
+ static const bool EMPTY_BOOL = false;
std::string Value::escapeMinimumCharacters(const std::string &str) {
std::stringstream result;

0 comments on commit c2f541d

Please sign in to comment.