From 0fab61e56b5a02726bbd8db0f4c003b52365fa4d Mon Sep 17 00:00:00 2001 From: Gianluca Petrillo Date: Fri, 11 Aug 2023 13:10:23 -0700 Subject: [PATCH 1/2] MultipleChoiceSelection.h: added missing inline directives --- lardataalg/Utilities/MultipleChoiceSelection.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lardataalg/Utilities/MultipleChoiceSelection.h b/lardataalg/Utilities/MultipleChoiceSelection.h index dc172a72..d071213a 100644 --- a/lardataalg/Utilities/MultipleChoiceSelection.h +++ b/lardataalg/Utilities/MultipleChoiceSelection.h @@ -491,25 +491,25 @@ 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); } From 73202f7d36142008635b04ae8b88f5208767fa76 Mon Sep 17 00:00:00 2001 From: Gianluca Petrillo Date: Fri, 11 Aug 2023 15:16:19 -0500 Subject: [PATCH 2/2] Format. --- lardataalg/Utilities/MultipleChoiceSelection.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lardataalg/Utilities/MultipleChoiceSelection.h b/lardataalg/Utilities/MultipleChoiceSelection.h index d071213a..8406e443 100644 --- a/lardataalg/Utilities/MultipleChoiceSelection.h +++ b/lardataalg/Utilities/MultipleChoiceSelection.h @@ -491,7 +491,8 @@ bool my_lexicographical_compare(B1 b1, E1 e1, B2 b2, E2 e2, Comp less) return true; // 1 is shorter } // my_lexicographical_compare() -inline 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); }