refactor: Return std::optional from GetLogCategory

This commit is contained in:
MarcoFalke
2026-03-27 14:07:19 +01:00
parent 826819a510
commit fafb0c4cbe
3 changed files with 21 additions and 21 deletions

View File

@@ -165,9 +165,8 @@ BOOST_FIXTURE_TEST_CASE(logging_LogPrintMacros_CategoryName, LogSetup)
std::vector<std::pair<BCLog::LogFlags, std::string>> expected_category_names;
const auto category_names = SplitString(concatenated_category_names, ',');
for (const auto& category_name : category_names) {
BCLog::LogFlags category;
const auto trimmed_category_name = TrimString(category_name);
BOOST_REQUIRE(GetLogCategory(category, trimmed_category_name));
const auto category{*Assert(GetLogCategory(trimmed_category_name))};
expected_category_names.emplace_back(category, trimmed_category_name);
}