Cleanup: const correctness.
authorCarl Hetherington <cth@carlh.net>
Wed, 23 Nov 2022 20:03:52 +0000 (21:03 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 23 Nov 2022 20:23:25 +0000 (21:23 +0100)
src/lib/collator.cc
src/lib/collator.h

index 4f52597c29bf83eea2b768a6d63e9d4d06ef0b81..17afbe852c2208f7d1d70cf1c3631c67c570fb70 100644 (file)
@@ -53,7 +53,7 @@ Collator::~Collator()
 
 
 int
 
 
 int
-Collator::compare (string const& utf8_a, string const& utf8_b)
+Collator::compare (string const& utf8_a, string const& utf8_b) const
 {
        if (_collator) {
                UErrorCode error = U_ZERO_ERROR;
 {
        if (_collator) {
                UErrorCode error = U_ZERO_ERROR;
index 3762f240013fe83847ca212f05d04c921304e8eb..d422781248b063bc0d9f0a54e7d12d3a76fda9d1 100644 (file)
@@ -38,7 +38,7 @@ public:
        Collator(Collator const &) = delete;
        Collator& operator=(Collator const&) = delete;
 
        Collator(Collator const &) = delete;
        Collator& operator=(Collator const&) = delete;
 
-       int compare(std::string const& utf8_a, std::string const& utf8_b);
+       int compare(std::string const& utf8_a, std::string const& utf8_b) const;
 
 private:
        UCollator* _collator = nullptr;
 
 private:
        UCollator* _collator = nullptr;