mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-24 09:58:46 +00:00
Changed: Replace atoi by NLMISC::fromString
This commit is contained in:
parent
bfc65e70e7
commit
1560df430a
1 changed files with 6 additions and 8 deletions
|
@ -490,6 +490,8 @@ void COutputFile::generateOutput() const
|
|||
outbuff+="/*\n";
|
||||
outbuff+="\tFILE: ";
|
||||
outbuff+=_FileName+"\n\n";
|
||||
outbuff+="#ifndef RY_EGS_STATIC_BRICK_CPP_H\n";
|
||||
outbuff+="#define RY_EGS_STATIC_BRICK_CPP_H\n\n";
|
||||
outbuff+="\tWARNING: This file is autogenerated - any modifications will be lost at next regeneration\n\n";
|
||||
outbuff+="*/\n\n";
|
||||
|
||||
|
@ -505,6 +507,8 @@ void COutputFile::generateOutput() const
|
|||
_Structures[i].generateOutput(outbuff);
|
||||
}
|
||||
|
||||
outbuff+="#endif\n\n";
|
||||
|
||||
// read in the previous version of the output file
|
||||
char *inbuff=NULL;
|
||||
FILE *inf=fopen(_FileName.c_str(),"rb");
|
||||
|
@ -631,17 +635,11 @@ void COutputFile::CStruct::generateOutput(std::string &outbuff) const
|
|||
for (i=0;i<_Params.size();++i)
|
||||
{
|
||||
outbuff+="\t\t";
|
||||
outbuff+=_Params[i]._Name+"=";
|
||||
if (_Params[i]._Type==COutputFile::INT) outbuff+="atoi(";
|
||||
if (_Params[i]._Type==COutputFile::FLOAT) outbuff+="(float)atof(";
|
||||
outbuff+="args[";
|
||||
outbuff+="NLMISC::fromString(args[";
|
||||
if (i>100) outbuff+=('0'+((i/100)%10));
|
||||
if (i>10) outbuff+=('0'+((i/10)%10));
|
||||
outbuff+=('0'+(i%10));
|
||||
if (_Params[i]._Type==COutputFile::INT || _Params[i]._Type==COutputFile::FLOAT)
|
||||
outbuff+="].c_str());\n";
|
||||
else
|
||||
outbuff+="].c_str();\n";
|
||||
outbuff+="], "+_Params[i]._Name+");\n";
|
||||
}
|
||||
outbuff+="\n";
|
||||
outbuff+="\t\treturn *this;\n";
|
||||
|
|
Loading…
Reference in a new issue