]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/test: fix compiler warning 53616/head
authorRonen Friedman <rfriedma@redhat.com>
Sat, 23 Sep 2023 06:24:05 +0000 (01:24 -0500)
committerRonen Friedman <rfriedma@redhat.com>
Sat, 23 Sep 2023 06:24:05 +0000 (01:24 -0500)
Fixing a compiler warning regarding ambiguity of
the overloaded operator '==' (as it allows a one-sided
const operand)

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
src/test/librgw_file_aw.cc

index 11c81ad7fd44d82435415affbc5d6aae387b9981..1a769d2878f27bfe359012c31b7eb9f09cb11e1c 100644 (file)
@@ -93,11 +93,11 @@ namespace {
       } // page_ix
     }
 
-    int size() { return pages.size(); }
+    int size() const { return pages.size(); }
 
     struct iovec* get_iovs() { return iovs; }
 
-    bool operator==(const ZPageSet& rhs) {
+    bool operator==(const ZPageSet& rhs) const {
       int n = size();
       for (int page_ix = 0; page_ix < n; ++page_ix) {
        ZPage* p1 = pages[page_ix];