From 41c5db90743eeca48dece28651a8c131f1ba0d18 Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Thu, 4 May 2023 21:39:15 +0200 Subject: [PATCH] Replace bool array by more compact vector Signed-off-by: Stefan Weil --- src/ccmain/osdetect.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ccmain/osdetect.cpp b/src/ccmain/osdetect.cpp index daee2b4051..dcc1aa5297 100644 --- a/src/ccmain/osdetect.cpp +++ b/src/ccmain/osdetect.cpp @@ -460,7 +460,7 @@ ScriptDetector::ScriptDetector(const std::vector *allowed_scripts, OSResult // adding this blob. void ScriptDetector::detect_blob(BLOB_CHOICE_LIST *scores) { for (int i = 0; i < 4; ++i) { - bool done[kMaxNumberOfScripts] = {false}; + std::vector done(kMaxNumberOfScripts); BLOB_CHOICE_IT choice_it; choice_it.set_to_list(scores + i); @@ -488,7 +488,7 @@ void ScriptDetector::detect_blob(BLOB_CHOICE_LIST *scores) { } } // Script already processed before. - if (done[id]) { + if (done.at(id)) { continue; } done[id] = true;