Skip to content

Commit

Permalink
Fix some usage of rvalue references
Browse files Browse the repository at this point in the history
  • Loading branch information
0x1997 committed Sep 21, 2016
1 parent f28203c commit be54944
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/rapidjson/document.h
Original file line number Diff line number Diff line change
Expand Up @@ -1262,17 +1262,17 @@ class GenericValue {

#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
GenericValue& AddMember(GenericValue&& name, GenericValue&& value, Allocator& allocator) {
return AddMember(name, value, allocator);
return AddMember(std::move(name), std::move(value), allocator);
}
GenericValue& AddMember(GenericValue&& name, GenericValue& value, Allocator& allocator) {
return AddMember(name, value, allocator);
return AddMember(std::move(name), value, allocator);
}
GenericValue& AddMember(GenericValue& name, GenericValue&& value, Allocator& allocator) {
return AddMember(name, value, allocator);
return AddMember(name, std::move(value), allocator);
}
GenericValue& AddMember(StringRefType name, GenericValue&& value, Allocator& allocator) {
GenericValue n(name);
return AddMember(n, value, allocator);
return AddMember(n, std::move(value), allocator);
}
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS

Expand Down Expand Up @@ -1548,7 +1548,7 @@ class GenericValue {

#if RAPIDJSON_HAS_CXX11_RVALUE_REFS
GenericValue& PushBack(GenericValue&& value, Allocator& allocator) {
return PushBack(value, allocator);
return PushBack(std::move(value), allocator);
}
#endif // RAPIDJSON_HAS_CXX11_RVALUE_REFS

Expand Down

0 comments on commit be54944

Please sign in to comment.