forked from Mirrors/openclonk
Fix a few compiler warnings
parent
7cc1ef95a2
commit
7d17cb28e6
|
@ -686,7 +686,7 @@ Dialog *Screen::GetDialog(CStdWindow * pWindow)
|
|||
// get dialog with matching window
|
||||
Dialog *pDlg;
|
||||
for (Element *pEl = pLast; pEl; pEl = pEl->GetPrev())
|
||||
if (pDlg = pEl->GetDlg())
|
||||
if ( (pDlg = pEl->GetDlg()) != NULL)
|
||||
if (pDlg->pWindow == pWindow)
|
||||
return pDlg;
|
||||
return NULL;
|
||||
|
|
|
@ -49,6 +49,7 @@ namespace
|
|||
// Only one set of each of these elements allowed
|
||||
if (semanticSeen[element.semantic])
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
semanticSeen[element.semantic] = true;
|
||||
}
|
||||
|
@ -366,5 +367,5 @@ void StdMeshLoader::LoadSkeletonBinary(StdMesh *mesh, const char *src, size_t si
|
|||
}
|
||||
}
|
||||
|
||||
DebugLogF("Loaded skeleton with %d bones, %d animations", mesh->GetNumBones(), animations.size());
|
||||
DebugLogF("Loaded skeleton with %u bones, %u animations", mesh->GetNumBones(), static_cast<unsigned int>(animations.size()));
|
||||
}
|
||||
|
|
|
@ -485,12 +485,13 @@ bool CSurface::PageFlip(RECT *pSrcRt, RECT *pDstRt)
|
|||
if (!lpDDraw->pApp || !lpDDraw->pApp->AssertMainThread()) return false;
|
||||
#ifdef USE_GL
|
||||
if(pGL)
|
||||
pCtx->PageFlip();
|
||||
return pCtx->PageFlip();
|
||||
#endif
|
||||
#ifdef USE_DIRECTX
|
||||
if (pD3D)
|
||||
pD3D->PageFlip(pSrcRt, pDstRt);
|
||||
return pD3D->PageFlip(pSrcRt, pDstRt);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef USE_DIRECTX
|
||||
|
|
|
@ -76,9 +76,9 @@ class CDDrawCfg
|
|||
bool Shader; // whether to use pixelshaders
|
||||
|
||||
CDDrawCfg():
|
||||
ClipManuallyE (true),
|
||||
NoOffscreenBlits (true), // not yet working properly...
|
||||
Shader (false),
|
||||
ClipManuallyE (true)
|
||||
Shader (false)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
/* CStdWindow */
|
||||
|
||||
CStdWindow::CStdWindow ():
|
||||
Active(false), wnd(0), renderwnd(0), dpy(0), Hints(0), HasFocus(false), Info(0), pSurface(0)
|
||||
Active(false), pSurface(0), wnd(0), renderwnd(0), dpy(0), Hints(0), HasFocus(false), Info(0)
|
||||
{
|
||||
}
|
||||
CStdWindow::~CStdWindow () {
|
||||
|
|
|
@ -294,7 +294,7 @@ bool C4AulDebug::SendLine(const char *szType, const char *szData)
|
|||
void C4AulDebug::DebugStep(C4AulBCC *pCPos)
|
||||
{
|
||||
// Get top context
|
||||
C4AulScriptContext *pCtx = pExec->GetContext(pExec->GetContextDepth() - 1);
|
||||
//C4AulScriptContext *pCtx = pExec->GetContext(pExec->GetContextDepth() - 1);
|
||||
|
||||
// Already stopped? Ignore.
|
||||
// This means we are doing some calculation with suspended script engine.
|
||||
|
@ -455,4 +455,4 @@ StdStrBuf C4AulDebug::FormatCodePos(C4AulScriptContext *pCtx, C4AulBCC *pCPos)
|
|||
return FormatString("%s:%d", RelativePath(pCtx->Func->pOrgScript->ScriptName), iLine);
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -1962,6 +1962,7 @@ int C4AulParseState::Parse_Params(int iMaxCnt, const char * sWarn, C4AulFunc * p
|
|||
}
|
||||
case AB_ARRAYA_R: case AB_PAR_R: case AB_PARN_R: case AB_VARN_R: case AB_LOCALN_R: case AB_GLOBALN_R:
|
||||
from = C4V_pC4Value; break;
|
||||
default: break; // avoid compiler warning about unhandled enumerators
|
||||
}
|
||||
if (C4Value::WarnAboutConversion(from, to))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue