C++11 cleanup on constructors guiEngine (#6036)

* C++11 cleanup on constructors guiEngine
master
Vincent Glize 2017-06-24 13:41:30 +02:00 committed by Loïc Blot
parent 8a84e89922
commit 9da5fb1583
2 changed files with 36 additions and 52 deletions

View File

@ -45,14 +45,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#endif
/******************************************************************************/
/** TextDestGuiEngine */
/******************************************************************************/
TextDestGuiEngine::TextDestGuiEngine(GUIEngine* engine)
{
m_engine = engine;
}
/******************************************************************************/
void TextDestGuiEngine::gotText(const StringMap &fields)
{
@ -65,14 +57,6 @@ void TextDestGuiEngine::gotText(const std::wstring &text)
m_engine->getScriptIface()->handleMainMenuEvent(wide_to_utf8(text));
}
/******************************************************************************/
/** MenuTextureSource */
/******************************************************************************/
MenuTextureSource::MenuTextureSource(video::IVideoDriver *driver)
{
m_driver = driver;
}
/******************************************************************************/
MenuTextureSource::~MenuTextureSource()
{

View File

@ -43,7 +43,7 @@ typedef enum {
} texture_layer;
typedef struct {
video::ITexture* texture;
video::ITexture *texture = nullptr;
bool tile;
unsigned int minsize;
} image_definition;
@ -68,7 +68,7 @@ public:
* default constructor
* @param engine the engine data is transmitted for further processing
*/
TextDestGuiEngine(GUIEngine* engine);
TextDestGuiEngine(GUIEngine* engine) : m_engine(engine) {};
/**
* receive fields transmitted by guiFormSpecMenu
@ -84,7 +84,7 @@ public:
private:
/** target to transmit data to */
GUIEngine* m_engine;
GUIEngine *m_engine = nullptr;
};
/** GUIEngine specific implementation of ISimpleTextureSource */
@ -95,7 +95,7 @@ public:
* default constructor
* @param driver the video driver to load textures from
*/
MenuTextureSource(video::IVideoDriver *driver);
MenuTextureSource(video::IVideoDriver *driver) : m_driver(driver) {};
/**
* destructor, removes all loaded textures
@ -111,7 +111,7 @@ public:
private:
/** driver to get textures from */
video::IVideoDriver *m_driver;
video::IVideoDriver *m_driver = nullptr;
/** set of texture names to delete */
std::set<std::string> m_to_delete;
};
@ -193,15 +193,15 @@ private:
void updateTopLeftTextSize();
/** device to draw at */
irr::IrrlichtDevice* m_device;
irr::IrrlichtDevice *m_device = nullptr;
/** parent gui element */
gui::IGUIElement* m_parent;
gui::IGUIElement *m_parent = nullptr;
/** manager to add menus to */
IMenuManager* m_menumanager;
IMenuManager *m_menumanager = nullptr;
/** scene manager to add scene elements to */
scene::ISceneManager* m_smgr;
scene::ISceneManager *m_smgr = nullptr;
/** pointer to data beeing transfered back to main game handling */
MainMenuData* m_data;
MainMenuData *m_data = nullptr;
/** pointer to texture source */
ISimpleTextureSource *m_texture_source = nullptr;
/** pointer to soundmanager*/
@ -290,9 +290,9 @@ private:
/** absolute time of last cloud processing */
u32 lasttime;
/** pointer to cloud class */
Clouds* clouds;
Clouds *clouds = nullptr;
/** camera required for drawing clouds */
scene::ICameraSceneNode* camera;
scene::ICameraSceneNode *camera = nullptr;
};
/** is drawing of clouds enabled atm */