Skip to content

Commit

Permalink
hwmon: use vector::swap instead of assign
Browse files Browse the repository at this point in the history
Co-authored-by: zotnhucucbot <[email protected]>
  • Loading branch information
vmatare and wonbinbk committed Oct 16, 2024
1 parent 04f91c3 commit 70e7d05
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hwmon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ string HwmonInterface<HwmonT>::lookup()
}
else {
vector<filesystem::path> paths = dir_entries<filter_driver_file>(path);
found_paths_.assign(paths.begin(), paths.end());
found_paths_.swap(paths);
}

paths_it_.emplace(found_paths_.begin());
Expand Down

0 comments on commit 70e7d05

Please sign in to comment.