Skip to content

Commit 70e7d05

Browse files
vmatarewonbinbk
andcommitted
hwmon: use vector::swap instead of assign
Co-authored-by: zotnhucucbot <[email protected]>
1 parent 04f91c3 commit 70e7d05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hwmon.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ string HwmonInterface<HwmonT>::lookup()
281281
}
282282
else {
283283
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path);
284-
found_paths_.assign(paths.begin(), paths.end());
284+
found_paths_.swap(paths);
285285
}
286286

287287
paths_it_.emplace(found_paths_.begin());

0 commit comments

Comments
 (0)