Changeset 805 for cpp/frams


Ignore:
Timestamp:
06/09/18 08:21:52 (2 years ago)
Author:
Maciej Komosinski
Message:

Fixed clang's compiler forward declaration problem - not using ExtValue? in param.h (template moved to param.cpp)

Location:
cpp/frams/param
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/param/param.cpp

    r796 r805  
    422422}
    423423
    424 void SimpleAbstractParam::messageOnExceedRangeExtValue(int i, int setflags, ExtValue& valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set
     424template<typename T> void messageOnExceedRange(SimpleAbstractParam *pi, int i, int setflags, T valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set
     425{
     426        if (setflags & (PSET_HITMIN | PSET_HITMAX))
     427        {
     428                ExtValue v(valuetoset);
     429                pi->messageOnExceedRange(i, setflags, v);
     430        }
     431}
     432
     433void SimpleAbstractParam::messageOnExceedRange(int i, int setflags, ExtValue& valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set
    425434{
    426435        if (setflags & (PSET_HITMIN | PSET_HITMAX))
     
    10381047                }
    10391048        }
    1040         messageOnExceedRange(i, result, xcopy);
     1049        ::messageOnExceedRange(this, i, result, xcopy);
    10411050        return result;
    10421051}
     
    10721081                }
    10731082        }
    1074         messageOnExceedRange(i, result, xcopy);
     1083        ::messageOnExceedRange(this, i, result, xcopy);
    10751084        return result;
    10761085}
     
    11131122                }
    11141123        }
    1115         messageOnExceedRange(i, result, xcopy);
     1124        ::messageOnExceedRange(this, i, result, xcopy);
    11161125        return result;
    11171126}
     
    11441153                v.setObject(x);
    11451154                int result = (*(int(*)(void*, const ExtValue*))pe->fun2)(object, &v);
    1146                 messageOnExceedRange(i, result, xcopy);
     1155                ::messageOnExceedRange(this, i, result, xcopy);
    11471156                return result;
    11481157        }
     
    11641173        {
    11651174                int result = (*(int(*)(void*, const ExtValue*))pe->fun2)(object, &x);
    1166                 messageOnExceedRange(i, result, xcopy);
     1175                ::messageOnExceedRange(this, i, result, xcopy);
    11671176                return result;
    11681177        }
  • cpp/frams/param/param.h

    r796 r805  
    291291        ExtValue getExtValue(int);
    292292
    293         template<typename T> void messageOnExceedRange(int i, int setflags, T valuetoset) ///< prints a warning when setflags indicates that allowed param range has been exceeded during set
    294         {
    295                 if (setflags & (PSET_HITMIN | PSET_HITMAX))
    296                 {
    297                         ExtValue v(valuetoset);
    298                         messageOnExceedRangeExtValue(i, setflags, v);
    299                 }
    300         }
    301         void messageOnExceedRangeExtValue(int i, int setflags, ExtValue& valuetoset); ///< used by messageOnExceedRange() internally
    302 
     293        void messageOnExceedRange(int i, int setflags, ExtValue& valuetoset);
    303294        int setInt(int, paInt);
    304295        int setDouble(int, double);
Note: See TracChangeset for help on using the changeset viewer.