Skip to content

Commit

Permalink
fixed #94
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jun 28, 2015
1 parent 3f6b107 commit 862e700
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5085,14 +5085,14 @@ class basic_json
using lexer_char_t = unsigned char;

/// constructor with a given buffer
lexer(const string_t& s) noexcept
explicit lexer(const string_t& s) noexcept
: m_stream(nullptr), m_buffer(s)
{
m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
m_start = m_cursor = m_content;
m_limit = m_content + s.size();
}
lexer(std::istream* s) noexcept
explicit lexer(std::istream* s) noexcept
: m_stream(s), m_buffer()
{
getline(*m_stream, m_buffer);
Expand Down
4 changes: 2 additions & 2 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -5085,14 +5085,14 @@ class basic_json
using lexer_char_t = unsigned char;

/// constructor with a given buffer
lexer(const string_t& s) noexcept
explicit lexer(const string_t& s) noexcept
: m_stream(nullptr), m_buffer(s)
{
m_content = reinterpret_cast<const lexer_char_t*>(s.c_str());
m_start = m_cursor = m_content;
m_limit = m_content + s.size();
}
lexer(std::istream* s) noexcept
explicit lexer(std::istream* s) noexcept
: m_stream(s), m_buffer()
{
getline(*m_stream, m_buffer);
Expand Down

0 comments on commit 862e700

Please sign in to comment.