Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MultipleChoiceSelection.h: added missing inline directives #42

Merged
merged 2 commits into from
Aug 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions lardataalg/Utilities/MultipleChoiceSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -491,25 +491,26 @@ bool my_lexicographical_compare(B1 b1, E1 e1, B2 b2, E2 e2, Comp less)
return true; // 1 is shorter
} // my_lexicographical_compare()

bool util::details::CaseInsensitiveComparer::equal(std::string const& a, std::string const& b)
inline bool util::details::CaseInsensitiveComparer::equal(std::string const& a,
std::string const& b)
{
return std::equal(a.begin(), a.end(), b.begin(), b.end(), eq_lower);
}

// -----------------------------------------------------------------------------
bool util::details::CaseInsensitiveComparer::less(std::string const& a, std::string const& b)
inline bool util::details::CaseInsensitiveComparer::less(std::string const& a, std::string const& b)
{
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end(), cmp_lower);
} // util::details::CaseInsensitiveComparer::less()

// -----------------------------------------------------------------------------
bool util::details::CaseInsensitiveComparer::cmp_lower(unsigned char a, unsigned char b)
inline bool util::details::CaseInsensitiveComparer::cmp_lower(unsigned char a, unsigned char b)
{
return std::tolower(a) < std::tolower(b);
}

// -----------------------------------------------------------------------------
bool util::details::CaseInsensitiveComparer::eq_lower(unsigned char a, unsigned char b)
inline bool util::details::CaseInsensitiveComparer::eq_lower(unsigned char a, unsigned char b)
{
return std::tolower(a) == std::tolower(b);
}
Expand Down