From e745a47329766f582e74fd16aa22395da03253af Mon Sep 17 00:00:00 2001 From: Eran Date: Thu, 13 Jul 2023 12:41:31 +0300 Subject: [PATCH] fix string concats in versions-db-manager.cpp --- common/sw-update/versions-db-manager.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/common/sw-update/versions-db-manager.cpp b/common/sw-update/versions-db-manager.cpp index 3269985aec..e868a8842a 100644 --- a/common/sw-update/versions-db-manager.cpp +++ b/common/sw-update/versions-db-manager.cpp @@ -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 ""; @@ -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 ""; @@ -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) @@ -144,7 +144,7 @@ namespace rs2 return true; } - LOG_ERROR("Unknown policy type: " + policy_str); + LOG_ERROR( "Unknown policy type: " << policy_str ); return false; } @@ -173,7 +173,7 @@ namespace rs2 } else { - LOG_ERROR("Cannot open file: " + _dev_info_url); + LOG_ERROR( "Cannot open file: " << _dev_info_url ); } } #endif @@ -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() + " \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); }