refactor: split formatters and matchers into separated singleton classes (#166)

* split formatter into separated singleton classes

* split data engine matchers to classes

* nodiscard attribute for formatter methods

* small refactoring in matchers

* fix codefactor warnings

* fix test building
This commit is contained in:
2024-04-30 21:52:39 +03:00
parent 95572364c1
commit 64b4618904
182 changed files with 4928 additions and 766 deletions

View File

@ -85,7 +85,7 @@ public:
auto found = std::find_if(m_items.cbegin(), m_items.cend(),
[&_tag, &_type](auto item) { return item->tag(_type) == _tag; });
if (found == std::end(m_items)) {
if (found == m_items.cend()) {
qCWarning(LOG_LIB) << "Could not find item by tag" << _tag;
return nullptr;
}
@ -99,7 +99,7 @@ public:
auto found = std::find_if(m_items.cbegin(), m_items.cend(),
[_number](auto item) { return item->number() == _number; });
if (found == std::end(m_items)) {
if (found == m_items.cend()) {
qCWarning(LOG_LIB) << "Could not find item by number" << _number;
return nullptr;
}