fix a few clang warnings
This commit is contained in:
parent
0eed3c8c3b
commit
31ca73242b
5 changed files with 8 additions and 5 deletions
src
|
@ -268,7 +268,7 @@ bool HallPlaceFinder::IsAUsableMine(const CUnit &mine) const
|
|||
}
|
||||
// Town hall may not be near but we may be using it, check
|
||||
// for 2 buildings near it and assume it's been used
|
||||
if (unit.Type->Building && !unit.Type->GivesResource == resource) {
|
||||
if (unit.Type->Building && !(unit.Type->GivesResource == resource)) {
|
||||
++buildings;
|
||||
if (buildings == 2) {
|
||||
return false;
|
||||
|
|
|
@ -1301,7 +1301,7 @@ static void EditorCallbackKeyDown(unsigned key, unsigned keychar)
|
|||
const char *ptr = strchr(UiGroupKeys.c_str(), key);
|
||||
|
||||
if (ptr) {
|
||||
key = '0' + ptr - UiGroupKeys.c_str();
|
||||
key = ((int)'0') + ptr - UiGroupKeys.c_str();
|
||||
if (key > '9') {
|
||||
key = SDLK_BACKQUOTE;
|
||||
}
|
||||
|
@ -2080,4 +2080,4 @@ void StartEditor(const char *filename)
|
|||
SetDefaultTextColors(nc, rc);
|
||||
}
|
||||
|
||||
//@}
|
||||
//@}
|
||||
|
|
|
@ -653,6 +653,7 @@ unsigned CTileset::getWallDirection(int tileIndex, bool human) const
|
|||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
unsigned CTileset::getHumanWallTileIndex(int dirFlag) const
|
||||
{
|
||||
|
|
|
@ -568,7 +568,7 @@ static bool CommandKey(int key)
|
|||
|
||||
// FIXME: don't handle unicode well. Should work on all latin keyboard.
|
||||
if (ptr) {
|
||||
key = '0' + ptr - UiGroupKeys.c_str();
|
||||
key = ((int)'0') + ptr - UiGroupKeys.c_str();
|
||||
if (key > '9') {
|
||||
key = SDLK_BACKQUOTE;
|
||||
}
|
||||
|
|
|
@ -448,13 +448,15 @@ extern bool LoadShaderExtensions() {
|
|||
glFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC)(uintptr_t)SDL_GL_GetProcAddress("glFramebufferRenderbuffer");
|
||||
glDrawBuffers = (PFNGLDRAWBUFFERSPROC)(uintptr_t)SDL_GL_GetProcAddress("glDrawBuffers");
|
||||
glCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC)(uintptr_t)SDL_GL_GetProcAddress("glCheckFramebufferStatus");
|
||||
#endif
|
||||
if (glCreateShader && glGenFramebuffers && glGetUniformLocation && glActiveTextureProc) {
|
||||
LoadShaders();
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
return false; // FIXME: Does not currently work on OSX
|
||||
#endif
|
||||
}
|
||||
|
||||
extern void SetupFramebuffer() {
|
||||
|
|
Loading…
Add table
Reference in a new issue