From 5bb3f8774638b08d21fd5b91e63eab009a3beeac Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 21 Feb 2009 21:44:15 +0000 Subject: [PATCH] - GCC compile fix and warning removal. SVN r1434 (trunk) --- src/r_things.cpp | 32 +------------------------------- src/thingdef/thingdef.cpp | 2 +- src/thingdef/thingdef.h | 2 +- src/thingdef/thingdef_parse.cpp | 2 +- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/src/r_things.cpp b/src/r_things.cpp index 691aa8a56..11f453fb5 100644 --- a/src/r_things.cpp +++ b/src/r_things.cpp @@ -776,9 +776,6 @@ void R_InitSkins (void) // [RH] Find a skin by name int R_FindSkin (const char *name, int pclass) { - int min, max, mid; - int lexx; - if (stricmp ("base", name) == 0) { return pclass; @@ -788,39 +785,12 @@ int R_FindSkin (const char *name, int pclass) { if (strnicmp (skins[i].name, name, 16) == 0) { - if (PlayerClasses[pclass].CheckSkin (mid)) + if (PlayerClasses[pclass].CheckSkin (i)) return i; else return pclass; } } - - - /* - min = PlayerClasses.Size (); - max = (int)numskins-1; - - while (min <= max) - { - mid = (min + max)/2; - lexx = strnicmp (skins[mid].name, name, 16); - if (lexx == 0) - { - if (PlayerClasses[pclass].CheckSkin (mid)) - return mid; - else - return pclass; - } - else if (lexx < 0) - { - min = mid + 1; - } - else - { - max = mid - 1; - } - } - */ return pclass; } diff --git a/src/thingdef/thingdef.cpp b/src/thingdef/thingdef.cpp index 8e171e67f..5dcab6c60 100644 --- a/src/thingdef/thingdef.cpp +++ b/src/thingdef/thingdef.cpp @@ -78,7 +78,7 @@ PSymbolTable GlobalSymbols; // Starts a new actor definition // //========================================================================== -FActorInfo *CreateNewActor(FScriptPosition &sc, FName typeName, FName parentName, bool native) +FActorInfo *CreateNewActor(const FScriptPosition &sc, FName typeName, FName parentName, bool native) { const PClass *replacee = NULL; PClass *ti = NULL; diff --git a/src/thingdef/thingdef.h b/src/thingdef/thingdef.h index 3314458c7..42e683810 100644 --- a/src/thingdef/thingdef.h +++ b/src/thingdef/thingdef.h @@ -189,7 +189,7 @@ PSymbolActionFunction *FindGlobalActionFunction(const char *name); // //========================================================================== -FActorInfo *CreateNewActor(FScriptPosition &sc, FName typeName, FName parentName, bool native); +FActorInfo *CreateNewActor(const FScriptPosition &sc, FName typeName, FName parentName, bool native); void SetReplacement(FActorInfo *info, FName replaceName); void HandleActorFlag(FScanner &sc, Baggage &bag, const char *part1, const char *part2, int mod); diff --git a/src/thingdef/thingdef_parse.cpp b/src/thingdef/thingdef_parse.cpp index ec6653963..f58cc492f 100644 --- a/src/thingdef/thingdef_parse.cpp +++ b/src/thingdef/thingdef_parse.cpp @@ -965,7 +965,7 @@ static FActorInfo *ParseActorHeader(FScanner &sc, Baggage *bag) try { - FActorInfo *info = CreateNewActor(FScriptPosition(sc), typeName, parentName, native); + FActorInfo *info = CreateNewActor(sc, typeName, parentName, native); info->DoomEdNum = DoomEdNum > 0? DoomEdNum : -1; SetReplacement(info, replaceName);