Fixed some clang-tidy warnings.

This commit is contained in:
Alexander Shaduri
2023-03-03 23:00:52 +04:00
parent c4b2c1d760
commit 396ea3daf3
15 changed files with 204 additions and 204 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ hz::fs::path get_smartctl_binary()
// Look in smartmontools installation directory.
hz::fs::path system_binary;
do {
bool use_smt = rconfig::get_data<bool>("system/win32_search_smartctl_in_smartmontools");
const bool use_smt = rconfig::get_data<bool>("system/win32_search_smartctl_in_smartmontools");
if (!use_smt)
break;
@@ -86,7 +86,7 @@ std::string execute_smartctl(const std::string& device, const std::string& devic
{
// win32 doesn't have slashes in devices names. For others, check that slash is present.
if constexpr(!BuildEnv::is_kernel_family_windows()) {
std::string::size_type pos = device.rfind('/'); // find basename
const std::string::size_type pos = device.rfind('/'); // find basename
if (pos == std::string::npos) {
debug_out_error("app", DBG_FUNC_MSG << "Invalid device name \"" << device << "\".\n");
return _("Invalid device name specified.");