Silence a lot of inconsistent-missing-override warnings

alut-include-path
Julius Michaelis 2017-02-21 18:34:28 +01:00
parent 5f1ad6a5d7
commit d81a7f10e3
8 changed files with 30 additions and 24 deletions

View File

@ -58,12 +58,12 @@ public:
bool Append(const char *szFilename, bool text=false); // append (uncompressed only)
bool Close(StdBuf **ppMemory = nullptr);
bool Default();
bool Read(void *pBuffer, size_t iSize) { return Read(pBuffer, iSize, 0); }
bool Read(void *pBuffer, size_t iSize) override { return Read(pBuffer, iSize, 0); }
bool Read(void *pBuffer, size_t iSize, size_t *ipFSize);
bool Write(const void *pBuffer, int iSize);
bool WriteString(const char *szStr);
bool Rewind();
bool Advance(int iOffset);
bool Advance(int iOffset) override;
int Seek(long int offset, int whence); // seek in file by offset and stdio-style SEEK_* constants. Only implemented for uncompressed files.
long int Tell(); // get current file pos. Only implemented for uncompressed files.
bool IsOpen() const { return hFile || hgzFile; }

View File

@ -95,7 +95,7 @@ void C4ObjectListDlg::OnObjectContainerChanged(C4Object *obj, C4Object *old_cont
}
#endif WITH_QT_EDITOR
#endif // WITH_QT_EDITOR
C4ObjectListChangeListener & ObjectListChangeListener = Console.ObjectListDlg;

View File

@ -243,32 +243,32 @@ public:
bool GetVAO(unsigned int vaoid, GLuint& vao);
// General
void Clear();
void Default();
virtual bool OnResolutionChanged(unsigned int iXRes, unsigned int iYRes); // reinit clipper for new resolution
void Clear() override;
void Default() override ;
virtual bool OnResolutionChanged(unsigned int iXRes, unsigned int iYRes) override; // reinit clipper for new resolution
// Clipper
bool UpdateClipper(); // set current clipper to render target
bool UpdateClipper() override; // set current clipper to render target
const StdProjectionMatrix& GetProjectionMatrix() const { return ProjectionMatrix; }
virtual bool PrepareMaterial(StdMeshMatManager& mat_manager, StdMeshMaterialLoader& loader, StdMeshMaterial& mat);
virtual bool PrepareMaterial(StdMeshMatManager& mat_manager, StdMeshMaterialLoader& loader, StdMeshMaterial& mat) override;
// Surface
virtual bool PrepareRendering(C4Surface * sfcToSurface); // check if/make rendering possible to given surface
virtual bool PrepareSpriteShader(C4Shader& shader, const char* name, int ssc, C4GroupSet* pGroups, const char* const* additionalDefines, const char* const* additionalSlices);
virtual bool PrepareRendering(C4Surface * sfcToSurface) override; // check if/make rendering possible to given surface
virtual bool PrepareSpriteShader(C4Shader& shader, const char* name, int ssc, C4GroupSet* pGroups, const char* const* additionalDefines, const char* const* additionalSlices) override;
bool EnsureMainContextSelected() override;
virtual CStdGLCtx *CreateContext(C4Window * pWindow, C4AbstractApp *pApp);
virtual CStdGLCtx *CreateContext(C4Window * pWindow, C4AbstractApp *pApp) override;
// Blit
void SetupMultiBlt(C4ShaderCall& call, const C4BltTransform* pTransform, GLuint baseTex, GLuint overlayTex, GLuint normalTex, DWORD dwOverlayModClr, StdProjectionMatrix* out_modelview);
virtual void PerformMesh(StdMeshInstance &instance, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform* pTransform);
void FillBG(DWORD dwClr=0);
virtual void PerformMesh(StdMeshInstance &instance, float tx, float ty, float twdt, float thgt, DWORD dwPlayerColor, C4BltTransform* pTransform) override;
void FillBG(DWORD dwClr=0) override;
// Drawing
virtual void PerformMultiPix(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, C4ShaderCall* shader_call);
virtual void PerformMultiLines(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, float width, C4ShaderCall* shader_call);
virtual void PerformMultiTris(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, const C4BltTransform* pTransform, C4TexRef* pTex, C4TexRef* pOverlay, C4TexRef* pNormal, DWORD dwOverlayClrMod, C4ShaderCall* shader_call);
virtual void PerformMultiPix(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, C4ShaderCall* shader_call) override;
virtual void PerformMultiLines(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, float width, C4ShaderCall* shader_call) override;
virtual void PerformMultiTris(C4Surface* sfcTarget, const C4BltVertex* vertices, unsigned int n_vertices, const C4BltTransform* pTransform, C4TexRef* pTex, C4TexRef* pOverlay, C4TexRef* pNormal, DWORD dwOverlayClrMod, C4ShaderCall* shader_call) override;
void PerformMultiBlt(C4Surface* sfcTarget, DrawOperation op, const C4BltVertex* vertices, unsigned int n_vertices, bool has_tex, C4ShaderCall* shader_call);
// device objects
bool RestoreDeviceObjects(); // restore device dependent objects
bool InvalidateDeviceObjects(); // free device dependent objects
bool DeviceReady() { return !!pMainCtx; }
bool RestoreDeviceObjects() override; // restore device dependent objects
bool InvalidateDeviceObjects() override; // free device dependent objects
bool DeviceReady() override { return !!pMainCtx; }
bool InitShaders(C4GroupSet* pGroups); // load shaders from given group
C4Shader* GetSpriteShader(int ssc);
C4Shader* GetSpriteShader(bool haveBase, bool haveOverlay, bool haveNormal);
@ -283,7 +283,7 @@ public:
protected:
bool CheckGLError(const char *szAtOp);
const char* GLErrorString(GLenum code);
virtual bool Error(const char *szMsg);
virtual bool Error(const char *szMsg) override;
friend class C4Surface;
friend class C4TexRef;

View File

@ -631,6 +631,7 @@ namespace
std::vector<BoneTransform> bones;
if (mesh_instance.GetBoneCount() == 0)
{
#pragma clang diagnostic ignored "-Wmissing-braces"
// Upload dummy bone so we don't have to do branching in the vertex shader
static const BoneTransform dummy_bone = {
1.0f, 0.0f, 0.0f, 0.0f,
@ -678,7 +679,7 @@ namespace
else
{
PretransformedMeshVertex vtx{ 0, 0, 0, 0, 0, 0 };
for (int i = 0; i < StdMeshVertex::MaxBoneWeightCount && in.bone_weight[i] > 0; ++i)
for (size_t i = 0; i < StdMeshVertex::MaxBoneWeightCount && in.bone_weight[i] > 0; ++i)
{
float weight = in.bone_weight[i];
const auto &bone = mesh_instance.GetBoneTransform(in.bone_index[i]);

View File

@ -20,6 +20,9 @@
#include "graphics/C4Draw.h"
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Winconsistent-missing-override"
class CStdNoGfx : public C4Draw
{
public:
@ -49,4 +52,6 @@ public:
virtual void PerformMultiTris(C4Surface *, const C4BltVertex *, unsigned int, const C4BltTransform *, C4TexRef *, C4TexRef *, C4TexRef *, DWORD, C4ShaderCall*) {}
};
#pragma clang diagnostic pop
#endif

View File

@ -1630,7 +1630,7 @@ bool AlgoMandel(C4MCOverlay *pOvrl, int32_t iX, int32_t iY)
bool AlgoGradient(C4MCOverlay *pOvrl, int32_t iX, int32_t iY)
{
return (abs((iX^(iY*3)) * 2531011L) % 214013L) % z > iX / pOvrl->Wdt;
return (std::abs((iX^(iY*3)) * 2531011L) % 214013L) % z > iX / pOvrl->Wdt;
}
bool AlgoScript(C4MCOverlay *pOvrl, int32_t iX, int32_t iY)

View File

@ -126,7 +126,7 @@ void C4MainStat::Show()
StatArray[i] = pBestStat;
}
delete bHS;
delete [] bHS;
LogSilent("** Stat");

View File

@ -87,7 +87,7 @@ namespace Ogre
chunk->type = id;
chunk->size = size;
chunk->ReadImpl(stream);
return move(chunk);
return chunk;
}
void ChunkUnknown::ReadImpl(DataStream *stream) { stream->Seek(GetSize()); }