diff --git a/components/myguiplatform/myguicompat.h b/components/myguiplatform/myguicompat.h deleted file mode 100644 index 04ca11a79f..0000000000 --- a/components/myguiplatform/myguicompat.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H -#define OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H - -#include - -#if MYGUI_VERSION > MYGUI_DEFINE_VERSION(3, 4, 0) - #define OPENMW_MYGUI_CONST_GETTER_3_4_1 const -#else - #define OPENMW_MYGUI_CONST_GETTER_3_4_1 -#endif - -#endif // OPENMW_COMPONENTS_MYGUIPLATFORM_MYGUICOMPAT_H diff --git a/components/myguiplatform/myguidatamanager.cpp b/components/myguiplatform/myguidatamanager.cpp index 0310e996b9..fc5d2bf953 100644 --- a/components/myguiplatform/myguidatamanager.cpp +++ b/components/myguiplatform/myguidatamanager.cpp @@ -15,7 +15,7 @@ void DataManager::setResourcePath(const std::string &path) mResourcePath = path; } -MyGUI::IDataStream *DataManager::getData(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1 +MyGUI::IDataStream *DataManager::getData(const std::string &name) const { std::string fullpath = getDataPath(name); std::unique_ptr stream; @@ -34,13 +34,13 @@ void DataManager::freeData(MyGUI::IDataStream *data) delete data; } -bool DataManager::isDataExist(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1 +bool DataManager::isDataExist(const std::string &name) const { std::string fullpath = mResourcePath + "/" + name; return boost::filesystem::exists(fullpath); } -const MyGUI::VectorString &DataManager::getDataListNames(const std::string &pattern) OPENMW_MYGUI_CONST_GETTER_3_4_1 +const MyGUI::VectorString &DataManager::getDataListNames(const std::string &pattern) const { // TODO: pattern matching (unused?) static MyGUI::VectorString strings; @@ -49,7 +49,7 @@ const MyGUI::VectorString &DataManager::getDataListNames(const std::string &patt return strings; } -const std::string &DataManager::getDataPath(const std::string &name) OPENMW_MYGUI_CONST_GETTER_3_4_1 +const std::string &DataManager::getDataPath(const std::string &name) const { static std::string result; result.clear(); diff --git a/components/myguiplatform/myguidatamanager.hpp b/components/myguiplatform/myguidatamanager.hpp index ca2f94899c..da24763d7b 100644 --- a/components/myguiplatform/myguidatamanager.hpp +++ b/components/myguiplatform/myguidatamanager.hpp @@ -3,8 +3,6 @@ #include -#include "myguicompat.h" - namespace osgMyGUI { @@ -19,7 +17,7 @@ public: /** Get data stream from specified resource name. @param _name Resource name (usually file name). */ - MyGUI::IDataStream* getData(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override; + MyGUI::IDataStream* getData(const std::string& _name) const override; /** Free data stream. @param _data Data stream. @@ -29,18 +27,18 @@ public: /** Is data with specified name exist. @param _name Resource name. */ - bool isDataExist(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override; + bool isDataExist(const std::string& _name) const override; /** Get all data names with names that matches pattern. @param _pattern Pattern to match (for example "*.layout"). */ - const MyGUI::VectorString& getDataListNames(const std::string& _pattern) OPENMW_MYGUI_CONST_GETTER_3_4_1 override; + const MyGUI::VectorString& getDataListNames(const std::string& _pattern) const override; /** Get full path to data. @param _name Resource name. @return Return full path to specified data. */ - const std::string& getDataPath(const std::string& _name) OPENMW_MYGUI_CONST_GETTER_3_4_1 override; + const std::string& getDataPath(const std::string& _name) const override; private: std::string mResourcePath; diff --git a/components/myguiplatform/myguirendermanager.cpp b/components/myguiplatform/myguirendermanager.cpp index 7fb82bbce5..b8ca06a181 100644 --- a/components/myguiplatform/myguirendermanager.cpp +++ b/components/myguiplatform/myguirendermanager.cpp @@ -15,7 +15,6 @@ #include #include -#include "myguicompat.h" #include "myguitexture.hpp" #define MYGUI_PLATFORM_LOG_SECTION "Platform" @@ -276,7 +275,7 @@ public: osg::VertexBufferObject* getVertexBuffer(); void setVertexCount(size_t count) override; - size_t getVertexCount() OPENMW_MYGUI_CONST_GETTER_3_4_1 override; + size_t getVertexCount() const override; MyGUI::Vertex *lock() override; void unlock() override; @@ -303,7 +302,7 @@ void OSGVertexBuffer::setVertexCount(size_t count) mNeedVertexCount = count; } -size_t OSGVertexBuffer::getVertexCount() OPENMW_MYGUI_CONST_GETTER_3_4_1 +size_t OSGVertexBuffer::getVertexCount() const { return mNeedVertexCount; } diff --git a/components/myguiplatform/myguirendermanager.hpp b/components/myguiplatform/myguirendermanager.hpp index bfb3da605a..0d1ad4fb41 100644 --- a/components/myguiplatform/myguirendermanager.hpp +++ b/components/myguiplatform/myguirendermanager.hpp @@ -5,8 +5,6 @@ #include -#include "myguicompat.h" - namespace Resource { class ImageManager; @@ -79,7 +77,7 @@ public: const MyGUI::IntSize& getViewSize() const override { return mViewSize; } /** @see RenderManager::getVertexFormat */ - MyGUI::VertexColourType getVertexFormat() OPENMW_MYGUI_CONST_GETTER_3_4_1 override + MyGUI::VertexColourType getVertexFormat() const override { return mVertexFormat; } /** @see RenderManager::isFormatSupported */ @@ -112,7 +110,7 @@ public: void setInjectState(osg::StateSet* stateSet); /** @see IRenderTarget::getInfo */ - const MyGUI::RenderTargetInfo& getInfo() OPENMW_MYGUI_CONST_GETTER_3_4_1 override { return mInfo; } + const MyGUI::RenderTargetInfo& getInfo() const override { return mInfo; } bool checkTexture(MyGUI::ITexture* _texture); diff --git a/components/myguiplatform/scalinglayer.cpp b/components/myguiplatform/scalinglayer.cpp index 51c148253f..75a149c810 100644 --- a/components/myguiplatform/scalinglayer.cpp +++ b/components/myguiplatform/scalinglayer.cpp @@ -3,8 +3,6 @@ #include #include -#include "myguicompat.h" - namespace osgMyGUI { @@ -39,7 +37,7 @@ namespace osgMyGUI mTarget->doRender(_buffer, _texture, _count); } - const MyGUI::RenderTargetInfo& getInfo() OPENMW_MYGUI_CONST_GETTER_3_4_1 override + const MyGUI::RenderTargetInfo& getInfo() const override { mInfo = mTarget->getInfo(); mInfo.hOffset = mHOffset;