Skip to content

Commit

Permalink
fixed #15
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jan 6, 2015
1 parent bd9f49e commit 4647401
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/json.cc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ json json::parse(const char* s)
}


const std::string json::type_name() const noexcept
std::string json::type_name() const noexcept
{
switch (type_)
{
Expand Down Expand Up @@ -479,8 +479,8 @@ Internal implementation of the serialization function.
\param indentStep the indent level
\param currentIndent the current indent level (only used internally)
*/
const std::string json::dump(const bool prettyPrint,
const unsigned int indentStep, unsigned int currentIndent) const noexcept
std::string json::dump(const bool prettyPrint, const unsigned int indentStep,
unsigned int currentIndent) const noexcept
{
// helper function to return whitespace as indentation
const auto indent = [prettyPrint, &currentIndent]()
Expand Down Expand Up @@ -600,7 +600,7 @@ Serialization function for JSON objects. The function tries to mimick Python's
\see https://docs.python.org/2/library/json.html#json.dump
*/
const std::string json::dump(int indent) const noexcept
std::string json::dump(int indent) const noexcept
{
if (indent >= 0)
{
Expand Down
6 changes: 3 additions & 3 deletions src/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ class json

private:
/// return the type as string
const std::string type_name() const noexcept;
std::string type_name() const noexcept;

/// dump the object (with pretty printer)
const std::string dump(const bool, const unsigned int, unsigned int = 0) const noexcept;
std::string dump(const bool, const unsigned int, unsigned int = 0) const noexcept;

public:
/// explicit value conversion
Expand Down Expand Up @@ -210,7 +210,7 @@ class json
}

/// explicit serialization
const std::string dump(int = -1) const noexcept;
std::string dump(int = -1) const noexcept;

/// add an object/array to an array
json& operator+=(const json&);
Expand Down

0 comments on commit 4647401

Please sign in to comment.