Changeset 12532


Ignore:
Timestamp:
06/25/12 13:49:19 (13 years ago)
Author:
Mathieu Morlighem
Message:

do not allow double or int as intput

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/c/objects/Params/IntParam.h

    r12494 r12532  
    5757                void  GetParameterValue(FILE** pfid){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot return a FILE");}
    5858
    59                 void  SetValue(bool boolean){this->value=(int)boolean;}
     59                void  SetValue(bool boolean){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a bool");}
    6060                void  SetValue(int integer){this->value=integer;}
    6161                void  SetValue(int* intarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
    6262                void  SetValue(int* intarray,int M,int N){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int array");}
    63                 void  SetValue(IssmPDouble scalar){this->value=(int)scalar;}
     63                void  SetValue(IssmPDouble scalar){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmDouble");}
    6464                void  SetValue(char* string){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
    6565                void  SetValue(char** stringarray,int M){_error2_("Int param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
Note: See TracChangeset for help on using the changeset viewer.