From 70e7d055a2ac90fe7a14ba802e41962291e32613 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Victor=20Matar=C3=A9?= Date: Wed, 16 Oct 2024 15:55:59 +0200 Subject: [PATCH] hwmon: use vector::swap instead of assign Co-authored-by: zotnhucucbot --- src/hwmon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hwmon.cpp b/src/hwmon.cpp index d0940d2..893f8f9 100644 --- a/src/hwmon.cpp +++ b/src/hwmon.cpp @@ -281,7 +281,7 @@ string HwmonInterface::lookup() } else { vector paths = dir_entries(path); - found_paths_.assign(paths.begin(), paths.end()); + found_paths_.swap(paths); } paths_it_.emplace(found_paths_.begin());