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:
committed by
MihailRis
parent
aecd0f5db9
commit
35ef339b0c
@@ -146,7 +146,7 @@ void langs::load(const fs::path& resdir,
|
|||||||
if (locale != fallback) {
|
if (locale != fallback) {
|
||||||
load(resdir, locale, packs, *lang.get());
|
load(resdir, locale, packs, *lang.get());
|
||||||
}
|
}
|
||||||
current.reset(lang.release());
|
current = std::move(lang);
|
||||||
}
|
}
|
||||||
|
|
||||||
void langs::setup(const fs::path& resdir,
|
void langs::setup(const fs::path& resdir,
|
||||||
|
|||||||
Reference in New Issue
Block a user