Skip to content

Commit

Permalink
address code smell
Browse files Browse the repository at this point in the history
  • Loading branch information
dan-du-car committed Apr 16, 2024
1 parent 036a992 commit 5a0dbca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace RSUHealthMonitor
return root;
}

void RSUConfigurationList::parseRSUs(std::string &rsuConfigsStr)
void RSUConfigurationList::parseRSUs(const std::string &rsuConfigsStr)
{
auto json = parseJson(rsuConfigsStr);
std::vector<RSUConfiguration> tempConfigs;
Expand Down Expand Up @@ -70,8 +70,8 @@ namespace RSUHealthMonitor

if (rsuArray[i].isMember(RSUMIBVersionKey))
{
auto _rsuMIBVersionStr = rsuArray[i][RSUMIBVersionKey].asString();
config.mibVersion = strToMibVersion(_rsuMIBVersionStr);
auto rsuMIBVersionStr = rsuArray[i][RSUMIBVersionKey].asString();
config.mibVersion = strToMibVersion(rsuMIBVersionStr);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace RSUHealthMonitor
* @brief Parse RSUs configrations in JSON string representation, and update the memeber of list of RSUConfiguration struct.
* @param rsuConfigsStr A JSON string includes all RSUs related configrations.
*/
void parseRSUs(std::string &rsuConfigsStr);
void parseRSUs(const std::string &rsuConfigsStr);
/**
* @brief Get a list of RSUConfiguration struct.
*/
Expand Down

0 comments on commit 5a0dbca

Please sign in to comment.