another commit to trigger coverage

This commit is contained in:
Niels 2015-02-07 19:14:23 +01:00
parent cc274f8145
commit 87c250d843
2 changed files with 326 additions and 657 deletions

File diff suppressed because it is too large Load diff

View file

@ -909,31 +909,37 @@ class basic_json
{ {
break; break;
} }
case (value_t::number_integer): case (value_t::number_integer):
{ {
m_value.number_integer = 0; m_value.number_integer = 0;
break; break;
} }
case (value_t::number_float): case (value_t::number_float):
{ {
m_value.number_float = 0.0; m_value.number_float = 0.0;
break; break;
} }
case (value_t::boolean): case (value_t::boolean):
{ {
m_value.boolean = false; m_value.boolean = false;
break; break;
} }
case (value_t::string): case (value_t::string):
{ {
m_value.string->clear(); m_value.string->clear();
break; break;
} }
case (value_t::array): case (value_t::array):
{ {
m_value.array->clear(); m_value.array->clear();
break; break;
} }
case (value_t::object): case (value_t::object):
{ {
m_value.object->clear(); m_value.object->clear();
@ -2730,7 +2736,7 @@ class basic_json
@todo Take care of Unicode. @todo Take care of Unicode.
*/ */
std::string get_string() const inline std::string get_string() const
{ {
return std::string( return std::string(
reinterpret_cast<const char*>(current_re2c + 1), reinterpret_cast<const char*>(current_re2c + 1),
@ -2738,6 +2744,7 @@ class basic_json
); );
} }
private:
/// the buffer /// the buffer
std::string buffer; std::string buffer;
/// a pointer to the next character to read from the buffer /// a pointer to the next character to read from the buffer
@ -2785,7 +2792,7 @@ template <>
struct hash<nlohmann::json> struct hash<nlohmann::json>
{ {
/// return a hash value for a JSON object /// return a hash value for a JSON object
size_t operator()(const nlohmann::json& j) const inline size_t operator()(const nlohmann::json& j) const
{ {
// a naive hashing via the string representation // a naive hashing via the string representation
return hash<std::string>()(j.dump()); return hash<std::string>()(j.dump());
@ -2801,7 +2808,7 @@ no parse error occurred.
@param s a string representation of a JSON object @param s a string representation of a JSON object
@return a JSON object @return a JSON object
*/ */
nlohmann::json operator "" _json(const char* s, std::size_t) inline nlohmann::json operator "" _json(const char* s, std::size_t)
{ {
return nlohmann::json::parse(s); return nlohmann::json::parse(s);
} }