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;