17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 15:47:30 +01:00

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

This commit is contained in:
jerrrrycho
2026-10-10 16:24:06 +02:00
parent 9a674b4944
commit d0a6353449
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);