neteja cppcheck (44 → 0) i aïllar impls de tercers

This commit is contained in:
2026-05-16 17:53:50 +02:00
parent fe186ad39a
commit e31a3e9182
20 changed files with 151 additions and 196 deletions
+7 -21
View File
@@ -577,27 +577,13 @@ namespace Resource {
animations_.clear();
rooms_.clear();
for (const auto& l : List::get()->getListByType(List::Type::SOUND)) {
sounds_.emplace_back(SoundResource{.name = getFileName(l), .sound = nullptr});
}
for (const auto& l : List::get()->getListByType(List::Type::MUSIC)) {
musics_.emplace_back(MusicResource{.name = getFileName(l), .music = nullptr});
}
for (const auto& l : List::get()->getListByType(List::Type::BITMAP)) {
surfaces_.emplace_back(SurfaceResource{.name = getFileName(l), .surface = nullptr});
}
for (const auto& l : List::get()->getListByType(List::Type::PALETTE)) {
palettes_.emplace_back(ResourcePalette{.name = getFileName(l)});
}
for (const auto& l : List::get()->getListByType(List::Type::FONT)) {
text_files_.emplace_back(TextFileResource{.name = getFileName(l), .text_file = nullptr});
}
for (const auto& l : List::get()->getListByType(List::Type::ANIMATION)) {
animations_.emplace_back(AnimationResource{.name = getFileName(l), .yaml_data = {}});
}
for (const auto& l : List::get()->getListByType(List::Type::ROOM)) {
rooms_.emplace_back(RoomResource{.name = getFileName(l), .room = nullptr});
}
std::ranges::transform(List::get()->getListByType(List::Type::SOUND), std::back_inserter(sounds_), [](const auto& l) { return SoundResource{.name = getFileName(l), .sound = nullptr}; });
std::ranges::transform(List::get()->getListByType(List::Type::MUSIC), std::back_inserter(musics_), [](const auto& l) { return MusicResource{.name = getFileName(l), .music = nullptr}; });
std::ranges::transform(List::get()->getListByType(List::Type::BITMAP), std::back_inserter(surfaces_), [](const auto& l) { return SurfaceResource{.name = getFileName(l), .surface = nullptr}; });
std::ranges::transform(List::get()->getListByType(List::Type::PALETTE), std::back_inserter(palettes_), [](const auto& l) { return ResourcePalette{.name = getFileName(l)}; });
std::ranges::transform(List::get()->getListByType(List::Type::FONT), std::back_inserter(text_files_), [](const auto& l) { return TextFileResource{.name = getFileName(l), .text_file = nullptr}; });
std::ranges::transform(List::get()->getListByType(List::Type::ANIMATION), std::back_inserter(animations_), [](const auto& l) { return AnimationResource{.name = getFileName(l), .yaml_data = {}}; });
std::ranges::transform(List::get()->getListByType(List::Type::ROOM), std::back_inserter(rooms_), [](const auto& l) { return RoomResource{.name = getFileName(l), .room = nullptr}; });
}
void Cache::loadSoundByName(const std::string& name) {