Merge pull request #858 from mattismyname/develop

🔧 Fix up a few more effc++ items
pull/900/head
Niels Lohmann 2017-12-28 12:13:19 +01:00 committed by GitHub
commit f28fc2261a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 8 deletions

View File

@ -3526,7 +3526,7 @@ class primitive_iterator_t
return *this; return *this;
} }
primitive_iterator_t operator++(int) primitive_iterator_t const operator++(int)
{ {
auto result = *this; auto result = *this;
m_it++; m_it++;
@ -3539,7 +3539,7 @@ class primitive_iterator_t
return *this; return *this;
} }
primitive_iterator_t operator--(int) primitive_iterator_t const operator--(int)
{ {
auto result = *this; auto result = *this;
m_it--; m_it--;
@ -3850,7 +3850,7 @@ class iter_impl
@brief post-increment (it++) @brief post-increment (it++)
@pre The iterator is initialized; i.e. `m_object != nullptr`. @pre The iterator is initialized; i.e. `m_object != nullptr`.
*/ */
iter_impl operator++(int) iter_impl const operator++(int)
{ {
auto result = *this; auto result = *this;
++(*this); ++(*this);
@ -3893,7 +3893,7 @@ class iter_impl
@brief post-decrement (it--) @brief post-decrement (it--)
@pre The iterator is initialized; i.e. `m_object != nullptr`. @pre The iterator is initialized; i.e. `m_object != nullptr`.
*/ */
iter_impl operator--(int) iter_impl const operator--(int)
{ {
auto result = *this; auto result = *this;
--(*this); --(*this);
@ -4299,7 +4299,7 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {} json_reverse_iterator(const base_iterator& it) noexcept : base_iterator(it) {}
/// post-increment (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)); return static_cast<json_reverse_iterator>(base_iterator::operator++(1));
} }
@ -4311,7 +4311,7 @@ class json_reverse_iterator : public std::reverse_iterator<Base>
} }
/// post-decrement (it--) /// post-decrement (it--)
json_reverse_iterator operator--(int) json_reverse_iterator const operator--(int)
{ {
return static_cast<json_reverse_iterator>(base_iterator::operator--(1)); return static_cast<json_reverse_iterator>(base_iterator::operator--(1));
} }
@ -6567,7 +6567,8 @@ class serializer
// the codepoint from the UTF-8 bytes // the codepoint from the UTF-8 bytes
int codepoint = 0; int codepoint = 0;
assert(0 <= bytes and bytes <= 3); // bytes is unsigned type:
assert(bytes <= 3);
switch (bytes) switch (bytes)
{ {
case 0: case 0:
@ -7046,7 +7047,6 @@ class json_pointer
return result; return result;
} }
/*! /*!
@brief create and return a reference to the pointed to value @brief create and return a reference to the pointed to value