17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-17 05:09:20 +02:00

refactor(sonar): use std::ranges algorithms and std::erase(_if) (cpp:S6197)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jerrrrycho
2026-10-10 16:24:06 +02:00
parent 22c7c33a63
commit 51337cb1b7
9 changed files with 25 additions and 38 deletions

View File

@@ -172,10 +172,10 @@ std::shared_ptr<ui::skin_meta> ui::vehicles_bank::parse_meta(const std::string &
ToLower("n:" + meta->name + ":i:" + meta->short_id + ":d:" + meta->location +
":r:" + meta->rev_date + ":c:" + meta->rev_company + ":t:" + meta->texture_author + ":p:" + meta->photo_author);
std::replace(std::begin(meta->location), std::end(meta->location), '_', ' ');
std::replace(std::begin(meta->rev_company), std::end(meta->rev_company), '_', ' ');
std::replace(std::begin(meta->texture_author), std::end(meta->texture_author), '_', ' ');
std::replace(std::begin(meta->photo_author), std::end(meta->photo_author), '_', ' ');
std::ranges::replace(meta->location, '_', ' ');
std::ranges::replace(meta->rev_company, '_', ' ');
std::ranges::replace(meta->texture_author, '_', ' ');
std::ranges::replace(meta->photo_author, '_', ' ');
if (!meta->rev_date.empty() && meta->rev_date != "?") {
std::istringstream stream(meta->rev_date);