thresholds: Make variable naming and type the same
So what constitutes a severity value and a level is consistent across
the code.
Signed-off-by: Rashmica Gupta <rashmica.g@gmail.com>
Change-Id: Ie1af1b9b9b207339ca12235f04b95dc2a1e16979
diff --git a/src/Thresholds.cpp b/src/Thresholds.cpp
index e186acb..ebb9dd0 100644
--- a/src/Thresholds.cpp
+++ b/src/Thresholds.cpp
@@ -117,7 +117,7 @@
<< item.first << "\n";
return false;
}
- uint8_t severity =
+ unsigned int severity =
std::visit(VariantToUnsignedIntVisitor(), severityFind->second);
std::string directions =
@@ -181,13 +181,13 @@
std::cerr << "Malformed threshold in configuration\n";
return;
}
- unsigned int level = std::visit(VariantToUnsignedIntVisitor(),
- severityFind->second);
+ unsigned int severity = std::visit(
+ VariantToUnsignedIntVisitor(), severityFind->second);
std::string dir =
std::visit(VariantToStringVisitor(), directionFind->second);
- if (((findThresholdLevel(level, dir)) != threshold.level) ||
- ((findThresholdDirection(level, dir)) !=
+ if (((findThresholdLevel(severity, dir)) != threshold.level) ||
+ ((findThresholdDirection(severity, dir)) !=
threshold.direction))
{
return; // not the droid we're looking for