Changeset 310 for cpp/frams


Ignore:
Timestamp:
01/26/15 07:24:39 (9 years ago)
Author:
Maciej Komosinski
Message:

Param::getText(int) can be safely used in all cases (previously min<0 was not supported)

File:
1 edited

Legend:

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

    r306 r310  
    581581        if ((*(t = type(i))) == 'd')
    582582        {
    583                 for (int j = getInt(i); j >= 0; j--) if (t) t = strchr(t + 1, '~');
     583                paInt a,b,c;
     584                int value=getInt(i);
     585                if (getMinMax(i,a,b,c)>=2)
     586                        {
     587                        if (value>b)
     588                                return get(i);
     589                        value-=a;
     590                        }
     591                if (value<0) return get(i);
     592                for (; value >= 0; value--) if (t) t = strchr(t + 1, '~');
    584593                if (t)
    585594                {
Note: See TracChangeset for help on using the changeset viewer.