Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion contextual-classifier/MLInference.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ std::string MLInference::CleanTextPython(const std::string &input) {

// Step 1: Convert to lowercase
std::string line = input;
line = AuxRoutines::toLowerCase(line);
AuxRoutines::toLowerCase(line);

// Step 2: Replace commas with spaces
std::replace(line.begin(), line.end(), ',', ' ');
Expand Down
6 changes: 2 additions & 4 deletions modula/CoreModules/AuxRoutines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,7 @@ int8_t MinLRUCache::isPresent(int64_t data) {
return (this->mDataSet.find(data) != this->mDataSet.end());
}

std::string AuxRoutines::toLowerCase(const std::string& str) {
std::string result = str;
std::transform(result.begin(), result.end(), result.begin(),
void AuxRoutines::toLowerCase(std::string& str) {
std::transform(str.begin(), str.end(), str.begin(),
[](unsigned char c) { return std::tolower(c); });
return result;
}
2 changes: 1 addition & 1 deletion modula/CoreModules/Include/AuxRoutines.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AuxRoutines {

static int64_t generateUniqueHandle();
static int64_t getCurrentTimeInMilliseconds();
static std::string toLowerCase(const std::string& str);
static void toLowerCase(std::string& str);
};

// Following are some client-lib centric utilities
Expand Down
1 change: 1 addition & 0 deletions resource-tuner/init/RestuneInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ static ErrCode fetchMetaConfigs() {
try {
// Fetch target Name
UrmSettings::targetConfigs.targetName = AuxRoutines::getMachineName();
AuxRoutines::toLowerCase(UrmSettings::targetConfigs.targetName);
TYPELOGV(NOTIFY_CURRENT_TARGET_NAME, UrmSettings::targetConfigs.targetName.c_str());

submitPropGetRequest(MAX_CONCURRENT_REQUESTS, resultBuffer, "50");
Expand Down
Loading