fix: optimization: PVS-Studio warning V825

The 'current.reset(lang.release())' expression is equivalent to 'current = std::move(lang)'.
Changed 'current.reset(lang.release())' to 'current = std::move(lang)' to improve code clarity and performance.

Reported by: PVS-Studio

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov 2024-08-01 23:53:14 +03:00 committed by MihailRis
parent aecd0f5db9
commit 35ef339b0c

View File

@ -146,7 +146,7 @@ void langs::load(const fs::path& resdir,
if (locale != fallback) {
load(resdir, locale, packs, *lang.get());
}
current.reset(lang.release());
current = std::move(lang);
}
void langs::setup(const fs::path& resdir,