Skip to content

Commit

Permalink
🚑 fix compiler errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Jul 14, 2019
1 parent 6c7cde1 commit cf8251e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 20 deletions.
8 changes: 0 additions & 8 deletions include/nlohmann/detail/iterators/iter_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,6 @@ class iter_impl
return *this;
}

/// @copydoc operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>&)
iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept
{
m_object = other.m_object;
m_it = other.m_it;
return *this;
}

private:
/*!
@brief set the iterator to the first value
Expand Down
4 changes: 2 additions & 2 deletions include/nlohmann/detail/json_pointer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,14 +718,14 @@ class json_pointer

case detail::value_t::array:
{
if (JSON_UNLIKELY(reference_token == "-"))
if (JSON_HEDLEY_UNLIKELY(reference_token == "-"))
{
// "-" always fails the range check
return false;
}

// error condition (cf. RFC 6901, Sect. 4)
if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))
if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))
{
JSON_THROW(detail::parse_error::create(106, 0,
"array index '" + reference_token +
Expand Down
12 changes: 2 additions & 10 deletions single_include/nlohmann/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9363,14 +9363,6 @@ class iter_impl
return *this;
}

/// @copydoc operator=(const iter_impl<typename std::remove_const<BasicJsonType>::type>&)
iter_impl& operator=(const iter_impl<const BasicJsonType>& other) noexcept
{
m_object = other.m_object;
m_it = other.m_it;
return *this;
}

private:
/*!
@brief set the iterator to the first value
Expand Down Expand Up @@ -10693,14 +10685,14 @@ class json_pointer

case detail::value_t::array:
{
if (JSON_UNLIKELY(reference_token == "-"))
if (JSON_HEDLEY_UNLIKELY(reference_token == "-"))
{
// "-" always fails the range check
return false;
}

// error condition (cf. RFC 6901, Sect. 4)
if (JSON_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))
if (JSON_HEDLEY_UNLIKELY(reference_token.size() > 1 and reference_token[0] == '0'))
{
JSON_THROW(detail::parse_error::create(106, 0,
"array index '" + reference_token +
Expand Down

0 comments on commit cf8251e

Please sign in to comment.