fix: optimization: PVS-Studio warning V820

Replaced copying of the 'sources' variable with move semantics to improve performance.

By moving instead of copying, we avoid unnecessary copying of data and enhance efficiency.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
Vyacheslav Ivanov 2024-08-02 02:45:57 +03:00 committed by Pugemon
parent 6b3146f98a
commit 1068c3f4f4
No known key found for this signature in database
GPG Key ID: 472FA343B3CC3287

View File

@ -8,7 +8,7 @@
PacksManager::PacksManager() = default; PacksManager::PacksManager() = default;
void PacksManager::setSources(std::vector<fs::path> sources) { void PacksManager::setSources(std::vector<fs::path> sources) {
this->sources = sources; this->sources = std::move(sources);
} }
void PacksManager::scan() { void PacksManager::scan() {