Remove more dead code (#108)

This commit is contained in:
sfan5
2022-06-01 15:03:52 +02:00
committed by GitHub
parent 128cf1696c
commit aa095d9525
91 changed files with 8 additions and 14864 deletions

View File

@ -13,7 +13,6 @@
#include "CTimer.h"
#include "CLogger.h"
#include "irrString.h"
#include "IRandomizer.h"
namespace irr
{
@ -21,8 +20,8 @@ namespace irr
CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params)
: IrrlichtDevice(), VideoDriver(0), GUIEnvironment(0), SceneManager(0),
Timer(0), CursorControl(0), UserReceiver(params.EventReceiver),
Logger(0), Operator(0), Randomizer(0), FileSystem(0),
InputReceivingSceneManager(0), VideoModeList(0), ContextManager(0),
Logger(0), Operator(0), FileSystem(0),
InputReceivingSceneManager(0), ContextManager(0),
CreationParams(params), Close(false)
{
Timer = new CTimer(params.UsePerformanceTimer);
@ -40,10 +39,8 @@ CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params)
Logger->setLogLevel(CreationParams.LoggingLevel);
os::Printer::Logger = Logger;
Randomizer = createDefaultRandomizer();
FileSystem = io::createFileSystem();
VideoModeList = new video::CVideoModeList();
core::stringc s = "Irrlicht Engine version ";
s.append(getVersion());
@ -55,8 +52,6 @@ CIrrDeviceStub::CIrrDeviceStub(const SIrrlichtCreationParameters& params)
CIrrDeviceStub::~CIrrDeviceStub()
{
VideoModeList->drop();
if (GUIEnvironment)
GUIEnvironment->drop();
@ -81,9 +76,6 @@ CIrrDeviceStub::~CIrrDeviceStub()
if (Operator)
Operator->drop();
if (Randomizer)
Randomizer->drop();
CursorControl = 0;
if (Timer)
@ -159,13 +151,6 @@ gui::ICursorControl* CIrrDeviceStub::getCursorControl()
}
//! \return Returns a pointer to a list with all video modes supported
//! by the gfx adapter.
video::IVideoModeList* CIrrDeviceStub::getVideoModeList()
{
return VideoModeList;
}
//! return the context manager
video::IContextManager* CIrrDeviceStub::getContextManager()
{
@ -275,56 +260,6 @@ IOSOperator* CIrrDeviceStub::getOSOperator()
}
//! Provides access to the engine's currently set randomizer.
IRandomizer* CIrrDeviceStub::getRandomizer() const
{
return Randomizer;
}
//! Sets a new randomizer.
void CIrrDeviceStub::setRandomizer(IRandomizer* r)
{
if (r!=Randomizer)
{
if (Randomizer)
Randomizer->drop();
Randomizer=r;
if (Randomizer)
Randomizer->grab();
}
}
namespace
{
struct SDefaultRandomizer : public IRandomizer
{
virtual void reset(s32 value=0x0f0f0f0f) _IRR_OVERRIDE_
{
os::Randomizer::reset(value);
}
virtual s32 rand() const _IRR_OVERRIDE_
{
return os::Randomizer::rand();
}
virtual s32 randMax() const _IRR_OVERRIDE_
{
return os::Randomizer::randMax();
}
};
}
//! Creates a new default randomizer.
IRandomizer* CIrrDeviceStub::createDefaultRandomizer() const
{
IRandomizer* r = new SDefaultRandomizer();
if (r)
r->reset();
return r;
}
//! Sets the input receiving scene manager.
void CIrrDeviceStub::setInputReceivingSceneManager(scene::ISceneManager* sceneManager)
{