diff --git a/cpp/include/utils/data_conversion.hpp b/cpp/include/utils/data_conversion.hpp index e9ca7067..86e78309 100644 --- a/cpp/include/utils/data_conversion.hpp +++ b/cpp/include/utils/data_conversion.hpp @@ -20,14 +20,14 @@ #define UPPER_CASE_BIT_MASK 0b11011111 #define LOWER_CASE_BIT_MASK 0b00100000 -bool is_letter(const char& c) { +bool is_letter(char c) { char lower_cased_char = (char)(c | LOWER_CASE_BIT_MASK); return lower_cased_char >= 'a' && lower_cased_char <= 'z'; } std::string make_upper_case(const std::string& input) { std::string result; - for (auto& c: input) { + for (auto c: input) { if (is_letter(c)) { result += c & UPPER_CASE_BIT_MASK; @@ -42,7 +42,7 @@ std::string make_upper_case(const std::string& input) { std::string make_lower_case(const std::string& input) { std::string result; - for (auto& current_char: input) { + for (auto current_char: input) { if (is_letter(current_char)) { result += current_char | LOWER_CASE_BIT_MASK;