Changeset 12531


Ignore:
Timestamp:
06/25/12 13:38:03 (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/BoolParam.h

    r12494 r12531  
    5757
    5858                void  SetValue(bool boolean){this->value=boolean;}
    59                 void  SetValue(int integer){this->value=(bool)integer;}
    60                 void  SetValue(IssmPDouble scalar){this->value=(bool)scalar;}
     59                void  SetValue(int integer){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an int");}
     60                void  SetValue(IssmPDouble scalar){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold an IssmPDouble");}
    6161                void  SetValue(char* string){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string");}
    6262                void  SetValue(char** stringarray,int M){_error2_("Bool param of enum " << enum_type << " (" << EnumToStringx(enum_type) << ") cannot hold a string array");}
Note: See TracChangeset for help on using the changeset viewer.