diff options
| author | Suad Halilovic <[email protected]> | 2020-07-16 18:31:56 +0200 |
|---|---|---|
| committer | Suad Halilovic <[email protected]> | 2020-07-16 18:31:56 +0200 |
| commit | ffebcd247fcc5fec9aee85c26da581cee8a09d72 (patch) | |
| tree | 2063d53161ed9a07caa22b7804d61d1bfaefef27 /controller/LFDB.cpp | |
| parent | b6b11dbf8242ff17c58f10f817d754da3f8c00eb (diff) | |
2020/07/16, Minor optmizations
Diffstat (limited to 'controller/LFDB.cpp')
| -rw-r--r-- | controller/LFDB.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/controller/LFDB.cpp b/controller/LFDB.cpp index d11b77a0..03265347 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()) { |
