From 4f9b4f938539209b1186bb62696c87bf3948b9d0 Mon Sep 17 00:00:00 2001 From: Blake-Madden <66873089+Blake-Madden@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:39:15 -0400 Subject: [PATCH] Removed unused variables --- src/i18n_review.cpp | 17 ----------------- src/translation_catalog_review.h | 5 ++++- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/i18n_review.cpp b/src/i18n_review.cpp index a87cc9c..69c5b55 100644 --- a/src/i18n_review.cpp +++ b/src/i18n_review.cpp @@ -1986,47 +1986,30 @@ namespace i18n_check // commands is too complex and will cause the regex library to randomly throw exceptions std::wstring::const_iterator searchStart(resource.cbegin()); std::wsmatch res; - size_t commandPosition{ 0 }; - size_t previousLength{ 0 }; while (std::regex_search(searchStart, resource.cend(), res, m_printf_cpp_int_regex)) { searchStart += res.position() + res.length(); - commandPosition += res.position() + previousLength; - previousLength = res.length(); - results.push_back(std::make_pair(res.position(2), res.length(2))); } searchStart = resource.cbegin(); - commandPosition = previousLength = 0; while (std::regex_search(searchStart, resource.cend(), res, m_printf_cpp_float_regex)) { searchStart += res.position() + res.length(); - commandPosition += res.position() + previousLength; - previousLength = res.length(); - results.push_back(std::make_pair(res.position(2), res.length(2))); } searchStart = resource.cbegin(); - commandPosition = previousLength = 0; while (std::regex_search(searchStart, resource.cend(), res, m_printf_cpp_string_regex)) { searchStart += res.position() + res.length(); - commandPosition += res.position() + previousLength; - previousLength = res.length(); - results.push_back(std::make_pair(res.position(2), res.length(2))); } searchStart = resource.cbegin(); - commandPosition = previousLength = 0; while (std::regex_search(searchStart, resource.cend(), res, m_printf_cpp_pointer_regex)) { searchStart += res.position() + res.length(); - commandPosition += res.position() + previousLength; - previousLength = res.length(); - results.push_back(std::make_pair(res.position(2), res.length(2))); } diff --git a/src/translation_catalog_review.h b/src/translation_catalog_review.h index 956dcc1..8f3e5f1 100644 --- a/src/translation_catalog_review.h +++ b/src/translation_catalog_review.h @@ -47,7 +47,10 @@ namespace i18n_check void review_strings() override; private: - void operator()(std::wstring_view poFileText, const std::wstring& fileName) override {} + void operator()([[maybe_unused]] std::wstring_view, + [[maybe_unused]] const std::wstring&) override + { + } std::vector> m_catalog_entries; };