Skip to content

Commit

Permalink
Add JsonString::JsonString(const std::string&)
Browse files Browse the repository at this point in the history
  • Loading branch information
Sainan committed Dec 27, 2024
1 parent acd56ff commit 39cdafa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions soup/JsonString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ NAMESPACE_SOUP
{
}

JsonString::JsonString(const std::string& value) noexcept
: JsonNode(JSON_STRING), value(value)
{
}

JsonString::JsonString(std::string&& value) noexcept
: JsonNode(JSON_STRING), value(std::move(value))
{
Expand Down
1 change: 1 addition & 0 deletions soup/JsonString.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ NAMESPACE_SOUP
std::string value{};

explicit JsonString() noexcept;
explicit JsonString(const std::string& value) noexcept;
explicit JsonString(std::string&& value) noexcept;
explicit JsonString(const char*& c) SOUP_EXCAL;

Expand Down

0 comments on commit 39cdafa

Please sign in to comment.