From b75949055967327d009b24197532c899cc7ed469 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Wed, 12 Jun 2019 11:17:35 +0200 Subject: [PATCH] gcc 9.1: comparison object needs to be invocable as const. fixes issue #95 --- src/common/rclconfig.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/rclconfig.cpp b/src/common/rclconfig.cpp index 6b36fdf4..2a1c039f 100644 --- a/src/common/rclconfig.cpp +++ b/src/common/rclconfig.cpp @@ -659,7 +659,7 @@ vector RclConfig::getAllMimeTypes() const class SfString { public: SfString(const string& s) : m_str(s) {} - bool operator==(const SfString& s2) { + bool operator==(const SfString& s2) const { string::const_reverse_iterator r1 = m_str.rbegin(), re1 = m_str.rend(), r2 = s2.m_str.rbegin(), re2 = s2.m_str.rend(); while (r1 != re1 && r2 != re2) { @@ -675,7 +675,7 @@ public: class SuffCmp { public: - int operator()(const SfString& s1, const SfString& s2) { + int operator()(const SfString& s1, const SfString& s2) const { //cout << "Comparing " << s1.m_str << " and " << s2.m_str << endl; string::const_reverse_iterator r1 = s1.m_str.rbegin(), re1 = s1.m_str.rend(),