Changeset 1302 for cpp/frams/param


Ignore:
Timestamp:
04/25/24 21:59:54 (7 months ago)
Author:
Maciej Komosinski
Message:

Cosmetic / minor fixes

File:
1 edited

Legend:

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

    r1278 r1302  
    104104}
    105105
    106 int ParamInterface::getMinMaxInt(int prop, paInt& minumum, paInt& maximum, paInt &def)
    107 {
    108         return getMinMaxIntFromTypeDef(type(prop), minumum, maximum, def);
    109 }
    110 
    111 int ParamInterface::getMinMaxDouble(int prop, double& minumum, double& maximum, double& def)
    112 {
    113         return getMinMaxDoubleFromTypeDef(type(prop), minumum, maximum, def);
    114 }
    115 
    116 int ParamInterface::getMinMaxString(int prop, int& minumum, int& maximum, SString& def)
    117 {
    118         return getMinMaxStringFromTypeDef(type(prop), minumum, maximum, def);
    119 }
    120 
    121 int ParamInterface::getMinMaxIntFromTypeDef(const char* t, paInt& minumum, paInt& maximum, paInt &def)
     106int ParamInterface::getMinMaxInt(int prop, paInt& minimum, paInt& maximum, paInt &def)
     107{
     108        return getMinMaxIntFromTypeDef(type(prop), minimum, maximum, def);
     109}
     110
     111int ParamInterface::getMinMaxDouble(int prop, double& minimum, double& maximum, double& def)
     112{
     113        return getMinMaxDoubleFromTypeDef(type(prop), minimum, maximum, def);
     114}
     115
     116int ParamInterface::getMinMaxString(int prop, int& minimum, int& maximum, SString& def)
     117{
     118        return getMinMaxStringFromTypeDef(type(prop), minimum, maximum, def);
     119}
     120
     121int ParamInterface::getMinMaxIntFromTypeDef(const char* t, paInt& minimum, paInt& maximum, paInt &def)
    122122{
    123123        while (*t) if (*t == ' ') break; else t++;
    124         return sscanf(t, PA_INT_SCANF " " PA_INT_SCANF " " PA_INT_SCANF, &minumum, &maximum, &def);
    125 }
    126 
    127 int ParamInterface::getMinMaxDoubleFromTypeDef(const char* t, double& minumum, double& maximum, double& def)
     124        return sscanf(t, PA_INT_SCANF " " PA_INT_SCANF " " PA_INT_SCANF, &minimum, &maximum, &def);
     125}
     126
     127int ParamInterface::getMinMaxDoubleFromTypeDef(const char* t, double& minimum, double& maximum, double& def)
    128128{
    129129        while (*t) if (*t == ' ') break; else t++;
    130         return sscanf(t, "%lg %lg %lg", &minumum, &maximum, &def);
    131 }
    132 
    133 int ParamInterface::getMinMaxStringFromTypeDef(const char* t, int& minumum, int& maximum, SString& def)
     130        return sscanf(t, "%lf %lf %lf", &minimum, &maximum, &def);
     131}
     132
     133int ParamInterface::getMinMaxStringFromTypeDef(const char* t, int& minimum, int& maximum, SString& def)
    134134{
    135135        while (*t) if (*t == ' ') break; else t++;
    136         int ret = sscanf(t, "%d %d", &minumum, &maximum);
     136        int ret = sscanf(t, "%d %d", &minimum, &maximum);
    137137        def = SString::empty();
    138138        if (ret == 2)
Note: See TracChangeset for help on using the changeset viewer.