Skip to content

Commit

Permalink
added some whitespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
neandreithal committed Jun 4, 2024
1 parent f2e403b commit 6f0a77c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions include/jsoncons/json_object.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ namespace jsoncons {
members_.reserve(count);
for (auto s = first; s != last; ++s)
{
members_.emplace_back(key_type(s->first.c_str(),s->first.size(),get_allocator()), s->second);
members_.emplace_back(key_type(s->first.c_str(), s->first.size(), get_allocator()), s->second);
}
std::stable_sort(members_.begin(), members_.end(),
[](const key_value_type& a, const key_value_type& b) -> bool {return a.key().compare(b.key()) < 0;});
Expand Down Expand Up @@ -534,13 +534,13 @@ namespace jsoncons {
auto last = first + count;

std::sort(first, last, compare);
members_.emplace_back(key_type(first->name.c_str(),first->name.size(),get_allocator()), std::move(first->value));
members_.emplace_back(key_type(first->name.c_str(), first->name.size(), get_allocator()), std::move(first->value));
auto prev_it = first;
for (auto it = first+1; it != last; ++it)
{
if (it->name != prev_it->name)
{
members_.emplace_back(key_type(it->name.c_str(),it->name.size(),get_allocator()), std::move(it->value));
members_.emplace_back(key_type(it->name.c_str(), it->name.size(), get_allocator()), std::move(it->value));
}
++prev_it;
}
Expand All @@ -552,7 +552,7 @@ namespace jsoncons {
{
for (auto s = first; s != last; ++s)
{
members_.emplace_back(key_type(s->first.c_str(),s->first.size(),get_allocator()), s->second);
members_.emplace_back(key_type(s->first.c_str(), s->first.size(), get_allocator()), s->second);
}
std::stable_sort(members_.begin(),members_.end(),
[](const key_value_type& a, const key_value_type& b) -> bool {return a.key().compare(b.key()) < 0;});
Expand Down
2 changes: 1 addition & 1 deletion include/jsoncons_ext/cbor/cbor_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class basic_cbor_parser : public ser_context
byte_string_type bytes;

mapped_string(const string_type& str, const allocator_type& alloc = allocator_type())
: type(jsoncons::cbor::detail::cbor_major_type::text_string), str(str.c_str(),str.size(),alloc), bytes(alloc)
: type(jsoncons::cbor::detail::cbor_major_type::text_string), str(str.c_str(), str.size(), alloc), bytes(alloc)
{
}

Expand Down

0 comments on commit 6f0a77c

Please sign in to comment.