Skip to content

Commit

Permalink
🔧 Fix up a few more effc++ items
Browse files Browse the repository at this point in the history
  • Loading branch information
intelmatt committed Dec 24, 2017
1 parent 9f81beb commit bbe61d7
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3527,7 +3527,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 @@ -3540,7 +3540,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 @@ -3851,7 +3851,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 @@ -3894,7 +3894,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 @@ -4300,7 +4300,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 @@ -4312,7 +4312,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 @@ -6568,7 +6568,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 @@ -7047,7 +7048,6 @@ class json_pointer
return result;
}


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

Expand Down

0 comments on commit bbe61d7

Please sign in to comment.