1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-05 16:15:50 +03:00

fix(): fix the naming

This commit is contained in:
Roman Nozdrin
2024-08-17 20:54:51 +00:00
committed by Leonid Fedorov
parent 25c20bae9b
commit e2941628d1

View File

@@ -157,8 +157,8 @@ class Charset
std::string result; std::string result;
uint dummy_errors; uint dummy_errors;
result.resize(from.size() * getCharset().mbmaxlen); result.resize(from.size() * getCharset().mbmaxlen);
size_t resultingSize = my_convert(const_cast<char*>(result.c_str()), result.size(), &getCharset(), from.c_str(), size_t resultingSize = my_convert(const_cast<char*>(result.c_str()), result.size(), &getCharset(),
from.size(), &fromCs.getCharset(), &dummy_errors); from.c_str(), from.size(), &fromCs.getCharset(), &dummy_errors);
result.resize(resultingSize); result.resize(resultingSize);
return result; return result;
} }
@@ -272,10 +272,10 @@ class CollationAwareComparator : public Charset
inline bool ASCIIStringCaseInsensetiveEquals(const std::string& left, const std::string& right) inline bool ASCIIStringCaseInsensetiveEquals(const std::string& left, const std::string& right)
{ {
auto asciiLower = [](char c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; }; auto asciiHigher = [](char c) { return (c >= 'a' && c <= 'z') ? c - 'a' + 'A' : c; };
return left.size() == right.size() && return left.size() == right.size() &&
std::equal(left.begin(), left.end(), right.begin(), std::equal(left.begin(), left.end(), right.begin(),
[&asciiLower](char l, char r) { return asciiLower(l) == asciiLower(r); }); [&asciiHigher](char l, char r) { return asciiHigher(l) == asciiHigher(r); });
} }
} // end of namespace datatypes } // end of namespace datatypes