Remove logically dead code
Stage::T is never set, so it can never happen. Remove it entirely.
Found using static analysis.
Tested: Unit tests pass, good coverage here
Change-Id: I0dfb1aad5bef3ab4451df5e81794e56074f6e939
Signed-off-by: Ed Tanous <ed@tanous.net>
diff --git a/redfish-core/include/utils/time_utils.hpp b/redfish-core/include/utils/time_utils.hpp
index 30011e3..1708998 100644
--- a/redfish-core/include/utils/time_utils.hpp
+++ b/redfish-core/include/utils/time_utils.hpp
@@ -53,7 +53,6 @@
// P1DT1H1M1.100S
P,
Days,
- T,
Hours,
Minutes,
Seconds,
@@ -74,14 +73,10 @@
stage = ProcessingStage::Days;
continue;
}
- if (stage == ProcessingStage::Days || stage == ProcessingStage::T)
+ if (stage == ProcessingStage::Days)
{
if (v.front() == 'T')
{
- if (stage == ProcessingStage::T)
- {
- return std::nullopt;
- }
v.remove_prefix(1);
stage = ProcessingStage::Hours;
continue;