From 4246c605eca0fb6f48f5250c41a701c7d8753668 Mon Sep 17 00:00:00 2001 From: "Vladimir N. Korotenko" Date: Sat, 22 Nov 2025 20:19:15 +0300 Subject: [PATCH] count negative --- dm-cli/AccountStatus.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dm-cli/AccountStatus.cpp b/dm-cli/AccountStatus.cpp index 2175637..f308896 100644 --- a/dm-cli/AccountStatus.cpp +++ b/dm-cli/AccountStatus.cpp @@ -196,6 +196,8 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe positivefb++; if (statustext.compare("negative") == 0) negativefb++; + if (statustext.compare("neutral") == 0) + negativefb++; if (fb == 0) { @@ -204,22 +206,20 @@ int AccountFeedbacks(const std::string address, const char *bkaddress, bool isDe stream << " statustext: " << val["statustext"] << endl; stream << " comments: " << val["comments"] << endl; } - else + + if (fb == 1 && statustext.compare("positive") == 0) { - if (fb == 1 && statustext.compare("positive") == 0) - { - stream << "- deal: " << val["deal"] << endl; - stream << " date: " << val["date"] << endl; - stream << " statustext: " << val["statustext"] << endl; - stream << " comments: " << val["comments"] << endl; - } - else if (fb == 2 && statustext.compare("negative") == 0 || fb == 2 && statustext.compare("neutral") == 0) - { - stream << "- deal: " << val["deal"] << endl; - stream << " date: " << val["date"] << endl; - stream << " statustext: " << val["statustext"] << endl; - stream << " comments: " << val["comments"] << endl; - } + stream << "- deal: " << val["deal"] << endl; + stream << " date: " << val["date"] << endl; + stream << " statustext: " << val["statustext"] << endl; + stream << " comments: " << val["comments"] << endl; + } + if ((fb == 2 && statustext.compare("negative") == 0) || (fb == 2 && statustext.compare("neutral") == 0)) + { + stream << "- deal: " << val["deal"] << endl; + stream << " date: " << val["date"] << endl; + stream << " statustext: " << val["statustext"] << endl; + stream << " comments: " << val["comments"] << endl; } } stream << "------------Summary--------------" << endl;