mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-04 02:41:19 +00:00
Make OSGTexture final
To show that there are no more inheritance levels and also help compiler to better optimize virtual function calls. There is no need to access virtual table when compiler calls a virtual function of a final type.
This commit is contained in:
parent
5f800279ac
commit
d165966bea
@ -20,7 +20,8 @@ namespace Resource
|
|||||||
namespace osgMyGUI
|
namespace osgMyGUI
|
||||||
{
|
{
|
||||||
|
|
||||||
class OSGTexture : public MyGUI::ITexture {
|
class OSGTexture final : public MyGUI::ITexture
|
||||||
|
{
|
||||||
std::string mName;
|
std::string mName;
|
||||||
Resource::ImageManager* mImageManager;
|
Resource::ImageManager* mImageManager;
|
||||||
|
|
||||||
@ -37,7 +38,7 @@ namespace osgMyGUI
|
|||||||
public:
|
public:
|
||||||
OSGTexture(const std::string &name, Resource::ImageManager* imageManager);
|
OSGTexture(const std::string &name, Resource::ImageManager* imageManager);
|
||||||
OSGTexture(osg::Texture2D* texture, osg::StateSet* injectState = nullptr);
|
OSGTexture(osg::Texture2D* texture, osg::StateSet* injectState = nullptr);
|
||||||
virtual ~OSGTexture();
|
~OSGTexture() override;
|
||||||
|
|
||||||
osg::StateSet* getInjectState() { return mInjectState; }
|
osg::StateSet* getInjectState() { return mInjectState; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user