forked from Mirrors/openclonk
Clean up some unused variables and obsolete FIXMEs
parent
9bfd8097ae
commit
562816cfe5
|
@ -141,6 +141,9 @@ if(MSVC_VERSION)
|
||||||
list(APPEND OC_CXX_FLAGS "/wd4267")
|
list(APPEND OC_CXX_FLAGS "/wd4267")
|
||||||
endif()
|
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-
|
# List target source files. Don't directly create a target since we condi-
|
||||||
# tionally add more sources depending on configuration options later.
|
# tionally add more sources depending on configuration options later.
|
||||||
|
|
|
@ -51,7 +51,6 @@ void C4Action::Default()
|
||||||
void C4Action::CompileFunc(StdCompiler *pComp)
|
void C4Action::CompileFunc(StdCompiler *pComp)
|
||||||
{
|
{
|
||||||
// Note: Compiled directly into "Object"-categories, so beware of name clashes (see C4Object::CompileFunc)
|
// 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( Dir, "Dir", DIR_None ));
|
||||||
pComp->Value(mkNamingAdapt( ComDir, "ComDir", COMD_Stop ));
|
pComp->Value(mkNamingAdapt( ComDir, "ComDir", COMD_Stop ));
|
||||||
pComp->Value(mkNamingAdapt( Time, "ActionTime", 0 ));
|
pComp->Value(mkNamingAdapt( Time, "ActionTime", 0 ));
|
||||||
|
|
|
@ -199,7 +199,6 @@ void C4Def::CompileFunc(StdCompiler *pComp)
|
||||||
|
|
||||||
pComp->Value(mkNamingAdapt(id, "id", C4ID::None ));
|
pComp->Value(mkNamingAdapt(id, "id", C4ID::None ));
|
||||||
pComp->Value(mkNamingAdapt(toC4CArr(rC4XVer), "Version" ));
|
pComp->Value(mkNamingAdapt(toC4CArr(rC4XVer), "Version" ));
|
||||||
//FIXME pComp->Value(mkNamingAdapt(toC4CStrBuf(Name), "Name", "Undefined" ));
|
|
||||||
pComp->Value(mkNamingAdapt(mkParAdapt(RequireDef, false), "RequireDef", C4IDList() ));
|
pComp->Value(mkNamingAdapt(mkParAdapt(RequireDef, false), "RequireDef", C4IDList() ));
|
||||||
|
|
||||||
const StdBitfieldEntry<int32_t> Categories[] =
|
const StdBitfieldEntry<int32_t> Categories[] =
|
||||||
|
|
|
@ -2480,7 +2480,6 @@ void InitObjectFunctionMap(C4AulScriptEngine *pEngine)
|
||||||
AddFunc(pEngine, PSF_OnOwnerRemoved, FnOnOwnerRemoved, false);
|
AddFunc(pEngine, PSF_OnOwnerRemoved, FnOnOwnerRemoved, false);
|
||||||
AddFunc(pEngine, "GetUnusedOverlayID", FnGetUnusedOverlayID, false);
|
AddFunc(pEngine, "GetUnusedOverlayID", FnGetUnusedOverlayID, false);
|
||||||
AddFunc(pEngine, "ExecuteCommand", FnExecuteCommand);
|
AddFunc(pEngine, "ExecuteCommand", FnExecuteCommand);
|
||||||
//FIXME new C4AulDefCastFunc(pEngine, "ScoreboardCol", C4V_C4ID, C4V_Int);
|
|
||||||
|
|
||||||
AddFunc(pEngine, "PlayAnimation", FnPlayAnimation);
|
AddFunc(pEngine, "PlayAnimation", FnPlayAnimation);
|
||||||
AddFunc(pEngine, "StopAnimation", FnStopAnimation);
|
AddFunc(pEngine, "StopAnimation", FnStopAnimation);
|
||||||
|
|
|
@ -2569,7 +2569,6 @@ void InitGameFunctionMap(C4AulScriptEngine *pEngine)
|
||||||
AddFunc(pEngine, "GetPlayerControlState", FnGetPlayerControlState);
|
AddFunc(pEngine, "GetPlayerControlState", FnGetPlayerControlState);
|
||||||
AddFunc(pEngine, "SetPlayerControlEnabled", FnSetPlayerControlEnabled);
|
AddFunc(pEngine, "SetPlayerControlEnabled", FnSetPlayerControlEnabled);
|
||||||
AddFunc(pEngine, "GetPlayerControlEnabled", FnGetPlayerControlEnabled);
|
AddFunc(pEngine, "GetPlayerControlEnabled", FnGetPlayerControlEnabled);
|
||||||
//FIXME new C4AulDefCastFunc(pEngine, "ScoreboardCol", C4V_C4ID, C4V_Int);
|
|
||||||
|
|
||||||
AddFunc(pEngine, "goto", Fn_goto);
|
AddFunc(pEngine, "goto", Fn_goto);
|
||||||
AddFunc(pEngine, "IncinerateLandscape", FnIncinerateLandscape);
|
AddFunc(pEngine, "IncinerateLandscape", FnIncinerateLandscape);
|
||||||
|
|
|
@ -594,7 +594,6 @@ void C4KeyCodeEx::CompileFunc(StdCompiler *pComp, StdStrBuf *pOutBufIfUndefined)
|
||||||
// reading from file
|
// reading from file
|
||||||
StdStrBuf sCode;
|
StdStrBuf sCode;
|
||||||
DWORD dwSetShift = 0;
|
DWORD dwSetShift = 0;
|
||||||
int shift_idx = 0;
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
pComp->Value(mkParAdapt(sCode, StdCompiler::RCT_Idtf));
|
pComp->Value(mkParAdapt(sCode, StdCompiler::RCT_Idtf));
|
||||||
|
|
|
@ -417,7 +417,7 @@ void StdStrBuf::AppendCharacter(uint32_t unicodechar)
|
||||||
*getMPtr(getLength() - 2) = (0x80 | ((unicodechar >> 6) & 0x3F));
|
*getMPtr(getLength() - 2) = (0x80 | ((unicodechar >> 6) & 0x3F));
|
||||||
*getMPtr(getLength() - 1) = (0x80 | (unicodechar & 0x3F));
|
*getMPtr(getLength() - 1) = (0x80 | (unicodechar & 0x3F));
|
||||||
}
|
}
|
||||||
else /* not an unicode code point, ignore */;
|
else /* not an unicode code point, ignore */ {}
|
||||||
}
|
}
|
||||||
|
|
||||||
void StdStrBuf::EnsureUnicode()
|
void StdStrBuf::EnsureUnicode()
|
||||||
|
|
|
@ -209,7 +209,6 @@ void C4ValueMapData::OnNameListChanged(const char **pOldNames, int32_t iOldSize)
|
||||||
int32_t i, j;
|
int32_t i, j;
|
||||||
for (i = 0; i < iOldSize; i++)
|
for (i = 0; i < iOldSize; i++)
|
||||||
{
|
{
|
||||||
//FIXME: This optimization is ugly.
|
|
||||||
if (i < pNames->iSize && SEqual(pNames->pNames[i], pOldNames[i]))
|
if (i < pNames->iSize && SEqual(pNames->pNames[i], pOldNames[i]))
|
||||||
{
|
{
|
||||||
pData[i] = pOldData[i];
|
pData[i] = pOldData[i];
|
||||||
|
|
Loading…
Reference in New Issue