diff options
author | neodarz <neodarz@neodarz.net> | 2019-09-10 10:26:16 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2019-09-10 14:40:01 +0200 |
commit | cc8c1ad450667c8f6f983ba4f0d640accdcb49cf (patch) | |
tree | 491e1f6ee0708ea379e3ead5f48246a36b88c0e9 /db | |
parent | 15ae8733b8267ff7af9033a1ebe2de6ffad9c89a (diff) | |
download | umosapicpp-cc8c1ad450667c8f6f983ba4f0d640accdcb49cf.tar.xz umosapicpp-cc8c1ad450667c8f6f983ba4f0d640accdcb49cf.zip |
Little refactorisationrestbed_rewrite
Diffstat (limited to '')
-rw-r--r-- | db/uobject.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/db/uobject.cpp b/db/uobject.cpp index 38b472f..bb911bb 100644 --- a/db/uobject.cpp +++ b/db/uobject.cpp @@ -13,7 +13,7 @@ std::string UmosapiService::uobject::retrieveAll(std::string collection, struct auto cursor = coll.find({}); - for (auto&& doc : cursor) { + for (const auto& doc : cursor) { json_object_array_add(jsonObjects, json_tokener_parse(bsoncxx::to_json(doc).c_str())); } @@ -126,7 +126,7 @@ std::string UmosapiService::uobject::searchKeyValue(std::string collection, std: auto cursor = coll.find(bsoncxx::from_json(json_string)); - for (auto&& doc : cursor) { + for (const auto& doc : cursor) { json_object_array_add(jsonArray, json_tokener_parse(bsoncxx::to_json(doc).c_str())); } |