Move Controller::getName definition to avoid unnecessary #include

This commit is contained in:
Geoffrey Mon 2017-08-02 13:46:48 -04:00
parent f3a962c391
commit ca5258a46c
2 changed files with 6 additions and 5 deletions

View File

@ -34,3 +34,7 @@ Controller::Controller(AbstractKart *kart)
m_kart = kart;
setControllerName("Controller");
} // Controller
core::stringw Controller::getName() const {
return translations->fribidize(m_kart->getName());
}

View File

@ -28,9 +28,9 @@ using namespace irr;
*/
#include "input/input.hpp"
#include "karts/abstract_kart.hpp"
#include "states_screens/state_manager.hpp"
class AbstractKart;
class Item;
class KartControl;
class Material;
@ -103,10 +103,7 @@ public:
/** Display name of the controller.
* Defaults to kart name; overriden by controller classes
* (such as player controllers) to display username. */
virtual core::stringw getName() const
{
return translations->fribidize(m_kart->getName());
} // getName
virtual core::stringw getName() const;
// ------------------------------------------------------------------------
/** Returns the kart controlled by this controller. */
AbstractKart *getKart() const { return m_kart; }