Changed: #853 Compilation on 64-bits platforms

This commit is contained in:
kervala 2010-05-09 14:30:23 +02:00
parent ed28f1f290
commit 091e2ea9d5

View file

@ -14,9 +14,9 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "nel/misc/types_nl.h" #include <nel/misc/types_nl.h>
#include "nel/misc/debug.h" #include <nel/misc/debug.h>
#include "nel/misc/file.h" #include <nel/misc/file.h>
#include <string> #include <string>
@ -68,10 +68,10 @@ sint main( sint argc, char ** argv )
getline(input,line,'\n'); getline(input,line,'\n');
// search the version motif // search the version motif
sint32 idx = line.find(argv[2]); string::size_type idx = line.find(argv[2]);
// if motif not found // if motif not found
if( idx == -1 ) if( idx == string::npos )
{ {
// we write the line in output and continue to the next line // we write the line in output and continue to the next line
fprintf(output,"%s\n",line.c_str()); fprintf(output,"%s\n",line.c_str());
@ -83,7 +83,7 @@ sint main( sint argc, char ** argv )
// search the main version number // search the main version number
idx = line.find(argv[3]); idx = line.find(argv[3]);
if( idx == -1 ) if( idx == string::npos )
{ {
fprintf(output,"%s\n",line.c_str()); fprintf(output,"%s\n",line.c_str());
continue; continue;
@ -92,9 +92,9 @@ sint main( sint argc, char ** argv )
versionNumberFound = true; versionNumberFound = true;
// get old build version number // get old build version number
sint32 oldBuildVersionStartIdx = line.rfind(".") + 1; string::size_type oldBuildVersionStartIdx = line.rfind(".") + 1;
sint32 oldBuildVersionEndIdx = line.find_first_of(" \"\t",oldBuildVersionStartIdx) - 1; string::size_type oldBuildVersionEndIdx = line.find_first_of(" \"\t",oldBuildVersionStartIdx) - 1;
if( oldBuildVersionEndIdx == -1) if( oldBuildVersionEndIdx == string::npos)
{ {
oldBuildVersionEndIdx = line.size() - 1; oldBuildVersionEndIdx = line.size() - 1;
} }