Skip to content

Commit

Permalink
Removed unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Blake-Madden committed Sep 18, 2024
1 parent 596af38 commit 4f9b4f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 deletions.
17 changes: 0 additions & 17 deletions src/i18n_review.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
}

Expand Down
5 changes: 4 additions & 1 deletion src/translation_catalog_review.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::pair<std::wstring, translation_catalog_entry>> m_catalog_entries;
};
Expand Down

0 comments on commit 4f9b4f9

Please sign in to comment.