Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🔧 Fix up a few more effc++ items #858

Merged
merged 1 commit into from
Dec 28, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
🔧 Fix up a few more effc++ items
  • Loading branch information
intelmatt committed Dec 24, 2017
commit 72bff90ed955421f4db98f272648afca565b72c8
16 changes: 8 additions & 8 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3526,7 +3526,7 @@ class primitive_iterator_t
return *this;
}

primitive_iterator_t operator++(int)
primitive_iterator_t const operator++(int)
{
auto result = *this;
m_it++;
Expand All @@ -3539,7 +3539,7 @@ class primitive_iterator_t
return *this;
}

primitive_iterator_t operator--(int)
primitive_iterator_t const operator--(int)
{
auto result = *this;
m_it--;
Expand Down Expand Up @@ -3850,7 +3850,7 @@ class iter_impl
@brief post-increment (it++)
@pre The iterator is initialized; i.e. `m_object != nullptr`.
*/
iter_impl operator++(int)
iter_impl const operator++(int)
{
auto result = *this;
++(*this);
Expand Down Expand Up @@ -3893,7 +3893,7 @@ class iter_impl
@brief post-decrement (it--)
@pre The iterator is initialized; i.e. `m_object != nullptr`.
*/
iter_impl operator--(int)
iter_impl const operator--(int)
{
auto result = *this;
--(*this);
Expand Down Expand Up @@ -4299,7 +4299,7 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {}

/// post-increment (it++)
json_reverse_iterator operator++(int)
json_reverse_iterator const operator++(int)
{
return static_cast<json_reverse_iterator>(base_iterator::operator++(1));
}
Expand All @@ -4311,7 +4311,7 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
}

/// post-decrement (it--)
json_reverse_iterator operator--(int)
json_reverse_iterator const operator--(int)
{
return static_cast<json_reverse_iterator>(base_iterator::operator--(1));
}
Expand Down Expand Up @@ -6567,7 +6567,8 @@ class serializer
// the codepoint from the UTF-8 bytes
int codepoint = 0;

assert(0 <= bytes and bytes <= 3);
// bytes is unsigned type:
assert(bytes <= 3);
switch (bytes)
{
case 0:
Expand Down Expand Up @@ -7046,7 +7047,6 @@ class json_pointer
return result;
}


/*!
@brief create and return a reference to the pointed to value

Expand Down