mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-12 22:55:53 +08:00
formatting changes.
This commit is contained in:
@@ -8,8 +8,8 @@
|
||||
|
||||
bool
|
||||
CStringUtil::CaselessCmp::cmpEqual(
|
||||
const CString::value_type& a,
|
||||
const CString::value_type& b)
|
||||
const CString::value_type& a,
|
||||
const CString::value_type& b)
|
||||
{
|
||||
// FIXME -- use std::tolower but not in all versions of libstdc++
|
||||
return tolower(a) == tolower(b);
|
||||
@@ -17,17 +17,15 @@ CStringUtil::CaselessCmp::cmpEqual(
|
||||
|
||||
bool
|
||||
CStringUtil::CaselessCmp::cmpLess(
|
||||
const CString::value_type& a,
|
||||
const CString::value_type& b)
|
||||
const CString::value_type& a,
|
||||
const CString::value_type& b)
|
||||
{
|
||||
// FIXME -- use std::tolower but not in all versions of libstdc++
|
||||
return tolower(a) < tolower(b);
|
||||
}
|
||||
|
||||
bool
|
||||
CStringUtil::CaselessCmp::less(
|
||||
const CString& a,
|
||||
const CString& b)
|
||||
CStringUtil::CaselessCmp::less(const CString& a, const CString& b)
|
||||
{
|
||||
return std::lexicographical_compare(
|
||||
a.begin(), a.end(),
|
||||
@@ -36,17 +34,13 @@ CStringUtil::CaselessCmp::less(
|
||||
}
|
||||
|
||||
bool
|
||||
CStringUtil::CaselessCmp::equal(
|
||||
const CString& a,
|
||||
const CString& b)
|
||||
CStringUtil::CaselessCmp::equal(const CString& a, const CString& b)
|
||||
{
|
||||
return !(less(a, b) || less(b, a));
|
||||
}
|
||||
|
||||
bool
|
||||
CStringUtil::CaselessCmp::operator()(
|
||||
const CString& a,
|
||||
const CString& b) const
|
||||
CStringUtil::CaselessCmp::operator()(const CString& a, const CString& b) const
|
||||
{
|
||||
return less(a, b);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user