mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-01 03:21:41 +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
|
||||
{
|
||||
|
||||
class OSGTexture : public MyGUI::ITexture {
|
||||
class OSGTexture final : public MyGUI::ITexture
|
||||
{
|
||||
std::string mName;
|
||||
Resource::ImageManager* mImageManager;
|
||||
|
||||
@ -37,7 +38,7 @@ namespace osgMyGUI
|
||||
public:
|
||||
OSGTexture(const std::string &name, Resource::ImageManager* imageManager);
|
||||
OSGTexture(osg::Texture2D* texture, osg::StateSet* injectState = nullptr);
|
||||
virtual ~OSGTexture();
|
||||
~OSGTexture() override;
|
||||
|
||||
osg::StateSet* getInjectState() { return mInjectState; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user