From 61a3ba2800c28557c1eefa8f2802788486a23edf Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Tue, 29 Sep 2015 21:35:29 +0200 Subject: [PATCH] Fix undefined function colobot-lint issues --- src/CBot/CBot.h | 6 ++---- src/app/system_linux.h | 2 ++ src/app/system_macosx.h | 3 +++ src/app/system_other.h | 2 ++ src/app/system_windows.h | 2 ++ src/common/singleton.h | 4 ++-- src/common/thread/resource_owning_thread.h | 1 + src/graphics/engine/water.h | 1 - src/object/task/taskgoto.h | 1 - src/script/scriptfunc.h | 1 - src/ui/mainmap.h | 3 --- src/ui/mainui.h | 1 - 12 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/CBot/CBot.h b/src/CBot/CBot.h index a45ead65..d86b2f35 100644 --- a/src/CBot/CBot.h +++ b/src/CBot/CBot.h @@ -224,7 +224,6 @@ public: bool GetRetVar(bool bRet); long GetVal(); - void SetStartError(int pos); void SetError(int n, CBotToken* token = nullptr); void SetPosError(CBotToken* token); void ResetError(int n, int start, int end); @@ -985,8 +984,8 @@ public: static CBotInstr* CompileBlkOrInst(CBotToken* &p, CBotCStack* pStack, bool bLocal = false); private: - CBotBlock(); - CBotBlock(const CBotBlock &); + CBotBlock() = delete; + CBotBlock(const CBotBlock &) = delete; }; @@ -1071,7 +1070,6 @@ public: bool Execute(CBotStack* &pj) override; void RestoreState(CBotStack* &pj, bool bMain) override; bool ExecuteVar(CBotVar* &pVar, CBotStack* &pile, CBotToken* prevToken, bool bStep); - bool Execute2Var(CBotVar* &pVar, CBotStack* &pj, CBotToken* prevToken, bool bStep); void RestoreStateVar(CBotStack* &pj, bool bMain) override; }; diff --git a/src/app/system_linux.h b/src/app/system_linux.h index bc68e32e..bbecc9da 100644 --- a/src/app/system_linux.h +++ b/src/app/system_linux.h @@ -26,6 +26,7 @@ #include +//@colobot-lint-exclude UndefinedFunctionRule struct SystemTimeStamp { @@ -50,3 +51,4 @@ private: bool m_zenityAvailable = false; }; +//@end-colobot-lint-exclude diff --git a/src/app/system_macosx.h b/src/app/system_macosx.h index 228c628d..ed27203e 100644 --- a/src/app/system_macosx.h +++ b/src/app/system_macosx.h @@ -25,6 +25,8 @@ #include "app/system.h" #include "app/system_other.h" +//@colobot-lint-exclude UndefinedFunctionRule + class CSystemUtilsMacOSX : public CSystemUtilsOther { public: @@ -41,3 +43,4 @@ private: std::string m_dataPath; }; +//@end-colobot-lint-exclude diff --git a/src/app/system_other.h b/src/app/system_other.h index 32437c44..03ba1965 100644 --- a/src/app/system_other.h +++ b/src/app/system_other.h @@ -28,6 +28,7 @@ #include +//@colobot-lint-exclude UndefinedFunctionRule struct SystemTimeStamp { @@ -51,3 +52,4 @@ public: void Usleep(int usec) override; }; +//@end-colobot-lint-exclude diff --git a/src/app/system_windows.h b/src/app/system_windows.h index 042b83c7..83c1e01c 100644 --- a/src/app/system_windows.h +++ b/src/app/system_windows.h @@ -24,6 +24,7 @@ #include "app/system.h" +//@colobot-lint-exclude UndefinedFunctionRule struct SystemTimeStamp { @@ -52,3 +53,4 @@ protected: long long m_counterFrequency = 0; }; +//@end-colobot-lint-exclude diff --git a/src/common/singleton.h b/src/common/singleton.h index 13c47228..9cda16da 100644 --- a/src/common/singleton.h +++ b/src/common/singleton.h @@ -69,7 +69,7 @@ public: #endif private: - CSingleton& operator=(const CSingleton &); - CSingleton(const CSingleton &); + CSingleton& operator=(const CSingleton &) = delete; + CSingleton(const CSingleton &) = delete; }; diff --git a/src/common/thread/resource_owning_thread.h b/src/common/thread/resource_owning_thread.h index d74755ca..b722043a 100644 --- a/src/common/thread/resource_owning_thread.h +++ b/src/common/thread/resource_owning_thread.h @@ -25,6 +25,7 @@ #include #include +#include /** * \class CResourceOwningThread diff --git a/src/graphics/engine/water.h b/src/graphics/engine/water.h index 2be10447..38704378 100644 --- a/src/graphics/engine/water.h +++ b/src/graphics/engine/water.h @@ -75,7 +75,6 @@ public: CWater(CEngine* engine); virtual ~CWater(); - void SetDevice(CDevice* device); bool EventProcess(const Event &event); //! Removes all the water void Flush(); diff --git a/src/object/task/taskgoto.h b/src/object/task/taskgoto.h index 80536209..a2d9c348 100644 --- a/src/object/task/taskgoto.h +++ b/src/object/task/taskgoto.h @@ -106,7 +106,6 @@ protected: Error BeamExplore(const Math::Vector &prevPos, const Math::Vector &curPos, const Math::Vector &goalPos, float goalRadius, float angle, int nbDiv, float step, int i, int nbIter); Math::Vector BeamPoint(const Math::Vector &startPoint, const Math::Vector &goalPoint, float angle, float step); - void BitmapDebug(const Math::Vector &min, const Math::Vector &max, const Math::Vector &start, const Math::Vector &goal); bool BitmapTestLine(const Math::Vector &start, const Math::Vector &goal, float stepAngle, bool bSecond); void BitmapObject(); void BitmapTerrain(const Math::Vector &min, const Math::Vector &max); diff --git a/src/script/scriptfunc.h b/src/script/scriptfunc.h index b78b55fc..e01cf7a4 100644 --- a/src/script/scriptfunc.h +++ b/src/script/scriptfunc.h @@ -125,7 +125,6 @@ private: static bool rMove(CBotVar* var, CBotVar* result, int& exception, void* user); static bool rTurn(CBotVar* var, CBotVar* result, int& exception, void* user); static bool rGoto(CBotVar* var, CBotVar* result, int& exception, void* user); - static bool rFind(CBotVar* var, CBotVar* result, int& exception, void* user); static bool rGrab(CBotVar* var, CBotVar* result, int& exception, void* user); static bool rDrop(CBotVar* var, CBotVar* result, int& exception, void* user); static bool rSniff(CBotVar* var, CBotVar* result, int& exception, void* user); diff --git a/src/ui/mainmap.h b/src/ui/mainmap.h index b80e9a47..5f903c99 100644 --- a/src/ui/mainmap.h +++ b/src/ui/mainmap.h @@ -58,9 +58,6 @@ public: void SetToy(bool bToy); void SetFixParam(float zoom, float ox, float oy, float angle, int mode, bool bDebug); -protected: - void CenterMap(); - protected: CEventQueue* m_event; Gfx::CEngine* m_engine; diff --git a/src/ui/mainui.h b/src/ui/mainui.h index da41a1de..f2477f3a 100644 --- a/src/ui/mainui.h +++ b/src/ui/mainui.h @@ -64,7 +64,6 @@ class CMainUserInterface public: CMainUserInterface(); ~CMainUserInterface(); - void Create(); CMainDialog* GetDialog();