Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix string concats in versions-db-manager.cpp #12083

Merged
merged 1 commit into from
Aug 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions common/sw-update/versions-db-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace rs2
case FIRMWARE: return "FIRMWARE";
break;
default:
LOG_ERROR("Unknown component type: " + component);
LOG_ERROR( "Unknown component type: " << component );
break;
}
return "";
Expand All @@ -106,7 +106,7 @@ namespace rs2
case ESSENTIAL: return "ESSENTIAL";
break;
default:
LOG_ERROR("Unknown policy type: " + policy);
LOG_ERROR( "Unknown policy type: " << policy );
break;
}
return "";
Expand All @@ -127,7 +127,7 @@ namespace rs2
return true;
}

LOG_ERROR("Unknown component type: " + component_str);
LOG_ERROR( "Unknown component type: " << component_str );
return false;
}
bool from_string(const std::string &policy_str, update_policy_type& policy_val)
Expand All @@ -144,7 +144,7 @@ namespace rs2
return true;
}

LOG_ERROR("Unknown policy type: " + policy_str);
LOG_ERROR( "Unknown policy type: " << policy_str );
return false;
}

Expand Down Expand Up @@ -173,7 +173,7 @@ namespace rs2
}
else
{
LOG_ERROR("Cannot open file: " + _dev_info_url);
LOG_ERROR( "Cannot open file: " << _dev_info_url );
}
}
#endif
Expand Down Expand Up @@ -210,14 +210,17 @@ namespace rs2
}
else
{
std::string error_str("Server versions file parsing error - validation fail on key: " + element_key + " value: " + it.value().get<std::string>() + " \n");
std::string error_str(
"Server versions file parsing error - validation fail on key: " + element_key
+ " value: " + it.value().get< std::string >() + " \n" );
LOG_ERROR(error_str);
throw std::runtime_error(error_str);
}
}
else
{
std::string error_str("Server versions file parsing error - " + element_key + " should be represented as a string");
std::string error_str( "Server versions file parsing error - " + element_key
+ " should be represented as a string" );
LOG_ERROR(error_str);
throw std::runtime_error(error_str);
}
Expand Down
Loading