Changeset 535
- Timestamp:
- 07/20/16 14:57:12 (8 years ago)
- Location:
- cpp/frams/param
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/param/multiparamload.cpp
r523 r535 290 290 return 1; 291 291 } 292 293 SString MultiParamLoader::currentFilePathForErrorMessage() 294 { 295 const char* filename=getFile()->VgetPath(); 296 if (filename) 297 return SString::sprintf(" in '%s'",filename); 298 return SString::empty(); 299 } -
cpp/frams/param/multiparamload.h
r382 r535 90 90 91 91 VirtFILE *getFile() {return file;} 92 SString currentFilePathForErrorMessage(); 92 93 93 94 /** Abort immediately and close the file if needed */ -
cpp/frams/param/mutableparam.cpp
r478 r535 169 169 { 170 170 if ((!id)&&(!type)) return -1; 171 if (!isValidTypeDescription(type)) return -1; 171 172 ParamEntry *pe=new ParamEntry(); 172 173 pe->fun1=0; pe->fun2=0; -
cpp/frams/param/param.cpp
r533 r535 710 710 } 711 711 712 bool ParamInterface::isValidTypeDescription(const char* t) 713 { 714 if (t==NULL) return false; 715 if (*t==0) return false; 716 if (strchr("dfsoxp", *t)==NULL) return false; 717 return true; 718 } 712 719 713 720 //////////////////////////////// PARAM //////////////////////////////////// … … 721 728 const char* err=NULL; 722 729 730 if (!isValidTypeDescription(t)) 731 err="invalid type description"; 723 732 if (*t=='p') 724 733 { -
cpp/frams/param/param.h
r483 r535 172 172 static const int LOAD2_IGNORE_PARSE_FAILED=(~LOAD2_PARSE_FAILED); ///< bitmask to be used if the parsing error is to be ignored. usage: int number_of_loaded_fields=load2(...) & LOAD2_IGNORE_PARSE_FAILED; 173 173 174 static bool isValidTypeDescription(const char* t); 174 175 #ifdef _DEBUG 175 176 virtual void sanityCheck(int i) {}
Note: See TracChangeset
for help on using the changeset viewer.