fixup 'fix config::add_child_at_total'

This commit is contained in:
gfgtdf 2018-12-06 16:45:46 +01:00 committed by GitHub
parent f1dc5de631
commit 8160d9add4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -571,7 +571,8 @@ config& config::add_child_at_total(config_key_type key, const config &val, size_
if(next == end) {
config& res = config::add_child(key, val);
std::rotate(ordered_children.begin() + pos, ordered_children.end(), ordered_children.end() - 1);
//rotate the just inserted element to position pos.
std::rotate(ordered_children.begin() + pos, ordered_children.end() - 1, ordered_children.end());
return res;
}