From d946b069b49e6fad7ade55494782c6f2ba293119 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Wed, 17 Jan 2024 11:01:17 -0700 Subject: [PATCH] IOSS: Address static analyzer suggestions --- packages/seacas/libraries/ioss/src/Ioss_Glob.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/seacas/libraries/ioss/src/Ioss_Glob.h b/packages/seacas/libraries/ioss/src/Ioss_Glob.h index 78c575b25b..b137707632 100644 --- a/packages/seacas/libraries/ioss/src/Ioss_Glob.h +++ b/packages/seacas/libraries/ioss/src/Ioss_Glob.h @@ -189,7 +189,7 @@ namespace Ioss::glob { return state_pos; } - size_t fail_state_; + size_t fail_state_{0}; private: std::tuple ExecAux(const String &str, bool comp_end = true) const @@ -207,7 +207,7 @@ namespace Ioss::glob { // the string if (comp_end) { if ((state_pos == match_state_) && (str_pos == str.length())) { - return {state_pos == match_state_, str_pos}; + return {true, str_pos}; } return {false, str_pos}; @@ -776,13 +776,6 @@ namespace Ioss::glob { c_ = str_[++pos_]; } - inline bool IsSpecialChar(charT c) - { - bool b = c == '?' || c == '*' || c == '+' || c == '(' || c == ')' || c == '[' || c == ']' || - c == '|' || c == '!' || c == '@' || c == '\\'; - return b; - } - String str_; size_t pos_{0}; charT c_;