summaryrefslogtreecommitdiff
path: root/controller/LFDB.cpp
diff options
context:
space:
mode:
authorAdam Ierymenko <[email protected]>2020-11-24 19:24:36 -0500
committerGitHub <[email protected]>2020-11-24 19:24:36 -0500
commitd64c5a92c6446586b5b5174b24f0bcf6c8d8f8e9 (patch)
tree95ba6c56b6d170382f23e11d239083921544af48 /controller/LFDB.cpp
parent0ba358a3d48d53e658f157f3bd2ddcb84dd9eebf (diff)
parentc1f4168d2f847161ca051b047c9fec91bbd10599 (diff)
Merge pull request #1233 from dosuperuser/improvement/optimizations
Minor C++ optimizations
Diffstat (limited to 'controller/LFDB.cpp')
-rw-r--r--controller/LFDB.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/controller/LFDB.cpp b/controller/LFDB.cpp
index 47b6d511..b935ecf5 100644
--- a/controller/LFDB.cpp
+++ b/controller/LFDB.cpp
@@ -190,10 +190,10 @@ LFDB::LFDB(const Identity &myId,const char *path,const char *lfOwnerPrivate,cons
if (resp) {
if (resp->status == 200) {
nlohmann::json results(OSUtils::jsonParse(resp->body));
- if ((results.is_array())&&(results.size() > 0)) {
+ if ((results.is_array())&&(!results.empty())) {
for(std::size_t ri=0;ri<results.size();++ri) {
nlohmann::json &rset = results[ri];
- if ((rset.is_array())&&(rset.size() > 0)) {
+ if ((rset.is_array())&&(!rset.empty())) {
nlohmann::json &result = rset[0];
if (result.is_object()) {
@@ -258,10 +258,10 @@ LFDB::LFDB(const Identity &myId,const char *path,const char *lfOwnerPrivate,cons
if (resp) {
if (resp->status == 200) {
nlohmann::json results(OSUtils::jsonParse(resp->body));
- if ((results.is_array())&&(results.size() > 0)) {
+ if ((results.is_array())&&(!results.empty())) {
for(std::size_t ri=0;ri<results.size();++ri) {
nlohmann::json &rset = results[ri];
- if ((rset.is_array())&&(rset.size() > 0)) {
+ if ((rset.is_array())&&(!rset.empty())) {
nlohmann::json &result = rset[0];
if (result.is_object()) {