From 07f43394f4c4c2e73cc56e6985d1148e81275b99 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Sun, 25 Oct 2015 14:43:59 +1000 Subject: [PATCH] Gmt module: Place const qualifiers where needed. --- modules/gmt/modgmt_func.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/gmt/modgmt_func.cpp b/modules/gmt/modgmt_func.cpp index b37e536..30e5b36 100644 --- a/modules/gmt/modgmt_func.cpp +++ b/modules/gmt/modgmt_func.cpp @@ -22,7 +22,7 @@ class Base2Something: public OBTypeM Base2Something(const ObjectBase* arg):OBTypeM(arg) {}; Base2Something(const ObjectList* input, const std::string& name):OBTypeM(input->Get(name)){}; Base2Something(const ObjectList* input, const ObjectList::ListValues::size_type i):OBTypeM((iSize())?input->At(i):0){}; // Check index, because At is not safe - auto operator ()(bool* b) -> decltype(this->OBTypeM::template operator()(b)) const {return OBTypeM::operator ()(b);} + auto operator ()(bool* b) const -> decltype(this->OBTypeM::template operator()(b)) {return OBTypeM::operator ()(b);} }; // Converting Int, Real or String to double @@ -30,13 +30,13 @@ template class DoubleConv { public: - double operator ()(const O* q, bool* suc) {return q->Value();} + double operator ()(const O* q, bool* suc) const {return q->Value();} }; template<> class DoubleConv { public: - double operator ()(const ObjectString* q, bool* suc) {double d=0; *suc=(*suc) && str2double(q->Value(),&d); return d;} + double operator ()(const ObjectString* q, bool* suc) const {double d=0; *suc=(*suc) && str2double(q->Value(),&d); return d;} }; typedef Base2Something Base2Double;