enh(Foundation): modernised header files (override, using, nullptr, ...)

This commit is contained in:
Matej Kenda
2025-02-10 14:52:52 +01:00
parent 9e4e039c04
commit e7687d4bba
184 changed files with 1487 additions and 1797 deletions

View File

@@ -44,8 +44,8 @@ std::size_t cstrlen(const C* str)
/// provided that call strlen() and wcslen().
{
const C* end = str;
while (*end) ++end;
return end - str;
while (*end) ++end;
return end - str;
}
@@ -288,13 +288,13 @@ int icompare(const S& str1, const S& str2)
// A special optimization for an often used case.
{
typename S::const_iterator it1(str1.begin());
typename S::const_iterator end1(str1.end());
const typename S::const_iterator end1(str1.end());
typename S::const_iterator it2(str2.begin());
typename S::const_iterator end2(str2.end());
const typename S::const_iterator end2(str2.end());
while (it1 != end1 && it2 != end2)
{
typename S::value_type c1(static_cast<typename S::value_type>(Ascii::toLower(*it1)));
typename S::value_type c2(static_cast<typename S::value_type>(Ascii::toLower(*it2)));
const typename S::value_type c1(static_cast<typename S::value_type>(Ascii::toLower(*it1)));
const typename S::value_type c2(static_cast<typename S::value_type>(Ascii::toLower(*it2)));
if (c1 < c2)
return -1;
else if (c1 > c2)
@@ -773,7 +773,7 @@ struct i_char_traits : public std::char_traits<charT>
};
typedef std::basic_string<char, i_char_traits<char>> istring;
using istring = std::basic_string<char, i_char_traits<char>>;
/// Case-insensitive std::string counterpart.