From cc8c1ad450667c8f6f983ba4f0d640accdcb49cf Mon Sep 17 00:00:00 2001 From: neodarz Date: Tue, 10 Sep 2019 10:26:16 +0200 Subject: Little refactorisation --- db/uobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'db/uobject.cpp') 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())); } -- cgit v1.2.1