Clean up some unused variables and obsolete FIXMEs

Günther Brammer 2011-09-28 01:09:56 +02:00
parent 9bfd8097ae
commit 562816cfe5
8 changed files with 4 additions and 7 deletions

View File

@ -141,6 +141,9 @@ if(MSVC_VERSION)
list(APPEND OC_CXX_FLAGS "/wd4267")
endif()
if(CMAKE_COMPILER_IS_GNUCXX)
list(APPEND OC_CXX_FLAGS "-Wall -Wextra -Wredundant-decls -Wendif-labels -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Winit-self -Wsign-promo -Wno-reorder -Wno-unused-parameter -Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo")
endif()
############################################################################
# List target source files. Don't directly create a target since we condi-
# tionally add more sources depending on configuration options later.

View File

@ -51,7 +51,6 @@ void C4Action::Default()
void C4Action::CompileFunc(StdCompiler *pComp)
{
// Note: Compiled directly into "Object"-categories, so beware of name clashes (see C4Object::CompileFunc)
// FIXME pComp->Value(mkNamingAdapt( toC4CStr(Name), "Action", "" ));
pComp->Value(mkNamingAdapt( Dir, "Dir", DIR_None ));
pComp->Value(mkNamingAdapt( ComDir, "ComDir", COMD_Stop ));
pComp->Value(mkNamingAdapt( Time, "ActionTime", 0 ));

View File

@ -199,7 +199,6 @@ void C4Def::CompileFunc(StdCompiler *pComp)
pComp->Value(mkNamingAdapt(id, "id", C4ID::None ));
pComp->Value(mkNamingAdapt(toC4CArr(rC4XVer), "Version" ));
//FIXME pComp->Value(mkNamingAdapt(toC4CStrBuf(Name), "Name", "Undefined" ));
pComp->Value(mkNamingAdapt(mkParAdapt(RequireDef, false), "RequireDef", C4IDList() ));
const StdBitfieldEntry<int32_t> Categories[] =

View File

@ -2480,7 +2480,6 @@ void InitObjectFunctionMap(C4AulScriptEngine *pEngine)
AddFunc(pEngine, PSF_OnOwnerRemoved, FnOnOwnerRemoved, false);
AddFunc(pEngine, "GetUnusedOverlayID", FnGetUnusedOverlayID, false);
AddFunc(pEngine, "ExecuteCommand", FnExecuteCommand);
//FIXME new C4AulDefCastFunc(pEngine, "ScoreboardCol", C4V_C4ID, C4V_Int);
AddFunc(pEngine, "PlayAnimation", FnPlayAnimation);
AddFunc(pEngine, "StopAnimation", FnStopAnimation);

View File

@ -2569,7 +2569,6 @@ void InitGameFunctionMap(C4AulScriptEngine *pEngine)
AddFunc(pEngine, "GetPlayerControlState", FnGetPlayerControlState);
AddFunc(pEngine, "SetPlayerControlEnabled", FnSetPlayerControlEnabled);
AddFunc(pEngine, "GetPlayerControlEnabled", FnGetPlayerControlEnabled);
//FIXME new C4AulDefCastFunc(pEngine, "ScoreboardCol", C4V_C4ID, C4V_Int);
AddFunc(pEngine, "goto", Fn_goto);
AddFunc(pEngine, "IncinerateLandscape", FnIncinerateLandscape);

View File

@ -594,7 +594,6 @@ void C4KeyCodeEx::CompileFunc(StdCompiler *pComp, StdStrBuf *pOutBufIfUndefined)
// reading from file
StdStrBuf sCode;
DWORD dwSetShift = 0;
int shift_idx = 0;
for (;;)
{
pComp->Value(mkParAdapt(sCode, StdCompiler::RCT_Idtf));

View File

@ -417,7 +417,7 @@ void StdStrBuf::AppendCharacter(uint32_t unicodechar)
*getMPtr(getLength() - 2) = (0x80 | ((unicodechar >> 6) & 0x3F));
*getMPtr(getLength() - 1) = (0x80 | (unicodechar & 0x3F));
}
else /* not an unicode code point, ignore */;
else /* not an unicode code point, ignore */ {}
}
void StdStrBuf::EnsureUnicode()

View File

@ -209,7 +209,6 @@ void C4ValueMapData::OnNameListChanged(const char **pOldNames, int32_t iOldSize)
int32_t i, j;
for (i = 0; i < iOldSize; i++)
{
//FIXME: This optimization is ugly.
if (i < pNames->iSize && SEqual(pNames->pNames[i], pOldNames[i]))
{
pData[i] = pOldData[i];