From 9257c9cc0c6bf85b80115dc0035a8d1c9c0c44c9 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 19 May 2018 13:28:53 +0300 Subject: [PATCH] - fixed compilation warnings reported by GCC/Clang src/r_data/models/models.cpp:418:33: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare] src/r_data/models/models.cpp:427:38: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare] src/r_data/models/models_ue1.cpp:49:37: warning: comparison of integers of different signs: 'long' and 'unsigned long' [-Wsign-compare] --- src/r_data/models/models.cpp | 4 ++-- src/r_data/models/models_ue1.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/r_data/models/models.cpp b/src/r_data/models/models.cpp index ad4e725763..ce41e064d6 100644 --- a/src/r_data/models/models.cpp +++ b/src/r_data/models/models.cpp @@ -415,7 +415,7 @@ static unsigned FindModel(const char * path, const char * modelfile) FMemLump lumpd = Wads.ReadLump(lump); char * buffer = (char*)lumpd.GetMem(); - if ( fullname.IndexOf("_d.3d") == fullname.Len()-5 ) + if ( (size_t)fullname.IndexOf("_d.3d") == fullname.Len()-5 ) { FString anivfile = fullname.GetChars(); anivfile.Substitute("_d.3d","_a.3d"); @@ -424,7 +424,7 @@ static unsigned FindModel(const char * path, const char * modelfile) model = new FUE1Model; } } - else if ( fullname.IndexOf("_a.3d") == fullname.Len()-5 ) + else if ( (size_t)fullname.IndexOf("_a.3d") == fullname.Len()-5 ) { FString datafile = fullname.GetChars(); datafile.Substitute("_a.3d","_d.3d"); diff --git a/src/r_data/models/models_ue1.cpp b/src/r_data/models/models_ue1.cpp index e07f471b95..d7394bd79a 100644 --- a/src/r_data/models/models_ue1.cpp +++ b/src/r_data/models/models_ue1.cpp @@ -46,7 +46,7 @@ bool FUE1Model::Load( const char *filename, int lumpnum, const char *buffer, int FMemLump lump2; const char *buffer2; FString realfilename = Wads.GetLumpFullName(lumpnum); - if ( realfilename.IndexOf("_d.3d") == realfilename.Len()-5 ) + if ( (size_t)realfilename.IndexOf("_d.3d") == realfilename.Len()-5 ) { realfilename.Substitute("_d.3d","_a.3d"); lumpnum2 = Wads.CheckNumForFullName(realfilename);