components/compiler cleanup; also cleaned up related cascading warnings; fixed up final/override issues

pull/3022/head
Bret Curtis 4 years ago
parent 5475e696c8
commit 5a824d0333

@ -59,38 +59,38 @@ namespace CSVRender
/// Editmode for terrain shape grid
TerrainShapeMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
void primaryOpenPressed (const WorldspaceHitResult& hit) override;
/// Create single command for one-click shape editing
void primaryEditPressed (const WorldspaceHitResult& hit) final;
void primaryEditPressed (const WorldspaceHitResult& hit) override;
/// Open brush settings window
void primarySelectPressed(const WorldspaceHitResult&) final;
void primarySelectPressed(const WorldspaceHitResult&) override;
void secondarySelectPressed(const WorldspaceHitResult&) final;
void secondarySelectPressed(const WorldspaceHitResult&) override;
void activate(CSVWidget::SceneToolbar*) final;
void deactivate(CSVWidget::SceneToolbar*) final;
void activate(CSVWidget::SceneToolbar*) override;
void deactivate(CSVWidget::SceneToolbar*) override;
/// Start shape editing command macro
bool primaryEditStartDrag (const QPoint& pos) final;
bool primaryEditStartDrag (const QPoint& pos) override;
bool secondaryEditStartDrag (const QPoint& pos) final;
bool primarySelectStartDrag (const QPoint& pos) final;
bool secondarySelectStartDrag (const QPoint& pos) final;
bool secondaryEditStartDrag (const QPoint& pos) override;
bool primarySelectStartDrag (const QPoint& pos) override;
bool secondarySelectStartDrag (const QPoint& pos) override;
/// Handle shape edit behavior during dragging
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) final;
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) override;
/// End shape editing command macro
void dragCompleted(const QPoint& pos) final;
void dragCompleted(const QPoint& pos) override;
/// Cancel shape editing, and reset all pending changes
void dragAborted() final;
void dragAborted() override;
void dragWheel (int diff, double speedFactor) final;
void dragMoveEvent (QDragMoveEvent *event) final;
void mouseMoveEvent (QMouseEvent *event) final;
void dragWheel (int diff, double speedFactor) override;
void dragMoveEvent (QDragMoveEvent *event) override;
void mouseMoveEvent (QMouseEvent *event) override;
private:

@ -27,10 +27,10 @@ namespace CSVRender
const CSMWorld::Data& mData;
std::array<float, ESM::Land::LAND_SIZE * ESM::Land::LAND_SIZE> mAlteredHeight;
osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) final;
const ESM::LandTexture* getLandTexture(int index, short plugin) final;
osg::ref_ptr<const ESMTerrain::LandObject> getLand (int cellX, int cellY) override;
const ESM::LandTexture* getLandTexture(int index, short plugin) override;
void getBounds(float& minX, float& maxX, float& minY, float& maxY) final;
void getBounds(float& minX, float& maxX, float& minY, float& maxY) override;
int getThisHeight(int col, int row, const ESM::Land::LandData *heightData) const;
int getLeftHeight(int col, int row, const ESM::Land::LandData *heightData) const;
@ -44,8 +44,8 @@ namespace CSVRender
bool leftOrUpIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
bool rightOrDownIsOverTheLimit(int col, int row, int heightWarningLimit, const ESM::Land::LandData *heightData) const;
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const final;
float getAlteredHeight(int col, int row) const final;
void adjustColor(int col, int row, const ESM::Land::LandData *heightData, osg::Vec4ub& color) const override;
float getAlteredHeight(int col, int row) const override;
};
}

@ -53,37 +53,37 @@ namespace CSVRender
/// \brief Editmode for terrain texture grid
TerrainTextureMode(WorldspaceWidget*, osg::Group* parentNode, QWidget* parent = nullptr);
void primaryOpenPressed (const WorldspaceHitResult& hit) final;
void primaryOpenPressed (const WorldspaceHitResult& hit) override;
/// \brief Create single command for one-click texture editing
void primaryEditPressed (const WorldspaceHitResult& hit) final;
void primaryEditPressed (const WorldspaceHitResult& hit) override;
/// \brief Open brush settings window
void primarySelectPressed(const WorldspaceHitResult&) final;
void primarySelectPressed(const WorldspaceHitResult&) override;
void secondarySelectPressed(const WorldspaceHitResult&) final;
void secondarySelectPressed(const WorldspaceHitResult&) override;
void activate(CSVWidget::SceneToolbar*) final;
void deactivate(CSVWidget::SceneToolbar*) final;
void activate(CSVWidget::SceneToolbar*) override;
void deactivate(CSVWidget::SceneToolbar*) override;
/// \brief Start texture editing command macro
bool primaryEditStartDrag (const QPoint& pos) final;
bool primaryEditStartDrag (const QPoint& pos) override;
bool secondaryEditStartDrag (const QPoint& pos) final;
bool primarySelectStartDrag (const QPoint& pos) final;
bool secondarySelectStartDrag (const QPoint& pos) final;
bool secondaryEditStartDrag (const QPoint& pos) override;
bool primarySelectStartDrag (const QPoint& pos) override;
bool secondarySelectStartDrag (const QPoint& pos) override;
/// \brief Handle texture edit behavior during dragging
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) final;
void drag (const QPoint& pos, int diffX, int diffY, double speedFactor) override;
/// \brief End texture editing command macro
void dragCompleted(const QPoint& pos) final;
void dragCompleted(const QPoint& pos) override;
void dragAborted() final;
void dragWheel (int diff, double speedFactor) final;
void dragMoveEvent (QDragMoveEvent *event) final;
void dragAborted() override;
void dragWheel (int diff, double speedFactor) override;
void dragMoveEvent (QDragMoveEvent *event) override;
void mouseMoveEvent (QMouseEvent *event) final;
void mouseMoveEvent (QMouseEvent *event) override;
private:
/// \brief Handle brush mechanics, maths regarding worldspace hit etc.

@ -132,11 +132,11 @@ namespace MWClass
void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const override;
float getWalkSpeed(const MWWorld::Ptr& ptr) const final;
float getWalkSpeed(const MWWorld::Ptr& ptr) const override;
float getRunSpeed(const MWWorld::Ptr& ptr) const final;
float getRunSpeed(const MWWorld::Ptr& ptr) const override;
float getSwimSpeed(const MWWorld::Ptr& ptr) const final;
float getSwimSpeed(const MWWorld::Ptr& ptr) const override;
};
}

@ -166,11 +166,11 @@ namespace MWClass
void modifyBaseInventory(const std::string& actorId, const std::string& itemId, int amount) const override;
float getWalkSpeed(const MWWorld::Ptr& ptr) const final;
float getWalkSpeed(const MWWorld::Ptr& ptr) const override;
float getRunSpeed(const MWWorld::Ptr& ptr) const final;
float getRunSpeed(const MWWorld::Ptr& ptr) const override;
float getSwimSpeed(const MWWorld::Ptr& ptr) const final;
float getSwimSpeed(const MWWorld::Ptr& ptr) const override;
};
}

@ -73,9 +73,9 @@ namespace MWDialogue
bool startDialogue (const MWWorld::Ptr& actor, ResponseCallback* callback) override;
std::list<std::string> getAvailableTopics() override;
int getTopicFlag(const std::string& topicId) final;
int getTopicFlag(const std::string& topicId) override;
bool inJournal (const std::string& topicId, const std::string& infoId) final;
bool inJournal (const std::string& topicId, const std::string& infoId) override;
void addTopic (const std::string& topic) override;

@ -22,8 +22,8 @@ namespace MWGui
*/
void setBackgroundImage (const std::string& image, bool fixedRatio=true, bool stretch=true);
void setSize (const MyGUI::IntSize &_value) final;
void setCoord (const MyGUI::IntCoord &_value) final;
void setSize (const MyGUI::IntSize &_value) override;
void setCoord (const MyGUI::IntCoord &_value) override;
private:
MyGUI::ImageBox* mChild;

@ -1152,7 +1152,7 @@ public:
i->second->createDrawItem (mNode);
}
void setVisible (bool newVisible) final
void setVisible (bool newVisible) override
{
if (mVisible == newVisible)
return;
@ -1174,7 +1174,7 @@ public:
}
}
void createDrawItem(MyGUI::ITexture* texture, MyGUI::ILayerNode* node) final
void createDrawItem(MyGUI::ITexture* texture, MyGUI::ILayerNode* node) override
{
mNode = node;
@ -1242,9 +1242,9 @@ public:
// ISubWidget should not necessarily be a drawitem
// in this case, it is not...
void doRender() final { }
void doRender() override { }
void _updateView () final
void _updateView () override
{
_checkMargin();
@ -1253,7 +1253,7 @@ public:
mNode->outOfDate (i->second->mRenderItem);
}
void _correctView() final
void _correctView() override
{
_checkMargin ();
@ -1263,7 +1263,7 @@ public:
}
void destroyDrawItem() final
void destroyDrawItem() override
{
for (ActiveTextFormats::iterator i = mActiveTextFormats.begin (); i != mActiveTextFormats.end (); ++i)
i->second->destroyDrawItem (mNode);
@ -1283,24 +1283,24 @@ public:
{
}
void showPage (TypesetBook::Ptr book, size_t page) final
void showPage (TypesetBook::Ptr book, size_t page) override
{
mPageDisplay->showPage (book, page);
}
void adviseLinkClicked (std::function <void (InteractiveId)> linkClicked) final
void adviseLinkClicked (std::function <void (InteractiveId)> linkClicked) override
{
mPageDisplay->mLinkClicked = linkClicked;
}
void unadviseLinkClicked () final
void unadviseLinkClicked () override
{
mPageDisplay->mLinkClicked = std::function <void (InteractiveId)> ();
}
protected:
void initialiseOverride() final
void initialiseOverride() override
{
Base::initialiseOverride();
@ -1314,24 +1314,24 @@ protected:
}
}
void onMouseLostFocus(Widget* _new) final
void onMouseLostFocus(Widget* _new) override
{
// NOTE: MyGUI also fires eventMouseLostFocus for widgets that are about to be destroyed (if they had focus).
// Child widgets may already be destroyed! So be careful.
mPageDisplay->onMouseLostFocus ();
}
void onMouseMove(int left, int top) final
void onMouseMove(int left, int top) override
{
mPageDisplay->onMouseMove (left, top);
}
void onMouseButtonPressed (int left, int top, MyGUI::MouseButton id) final
void onMouseButtonPressed (int left, int top, MyGUI::MouseButton id) override
{
mPageDisplay->onMouseButtonPressed (left, top, id);
}
void onMouseButtonReleased(int left, int top, MyGUI::MouseButton id) final
void onMouseButtonReleased(int left, int top, MyGUI::MouseButton id) override
{
mPageDisplay->onMouseButtonReleased (left, top, id);
}

@ -9,21 +9,17 @@ namespace MyGUI
class Widget;
}
namespace MWGui
{
namespace Controllers
namespace MWGui::Controllers
{
/// Automatically positions a widget below the mouse cursor.
class ControllerFollowMouse final :
public MyGUI::ControllerItem
class ControllerFollowMouse final : public MyGUI::ControllerItem
{
MYGUI_RTTI_DERIVED( ControllerFollowMouse )
private:
bool addTime(MyGUI::Widget* _widget, float _time) final;
void prepareItem(MyGUI::Widget* _widget) final;
bool addTime(MyGUI::Widget* _widget, float _time) override;
void prepareItem(MyGUI::Widget* _widget) override;
};
}
}
#endif

@ -20,10 +20,10 @@ namespace MWGui
ResourceImageSetPointerFix();
virtual ~ResourceImageSetPointerFix();
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) override;
void setImage(MyGUI::ImageBox* _image) final;
void setPosition(MyGUI::ImageBox* _image, const MyGUI::IntPoint& _point) final;
void setImage(MyGUI::ImageBox* _image) override;
void setPosition(MyGUI::ImageBox* _image, const MyGUI::IntPoint& _point) override;
//and now for the whole point of this class, allow us to get
//the hot spot, the image and the size of the cursor.

@ -36,7 +36,7 @@ namespace MWGui
/// Register needed components with MyGUI's factory manager
static void registerComponents();
void initialiseOverride() final;
void initialiseOverride() override;
/// Takes ownership of \a model
void setModel(ItemModel* model);
@ -47,8 +47,8 @@ namespace MWGui
void layoutWidgets();
void resetScrollbars();
void setSize(const MyGUI::IntSize& value) final;
void setCoord(const MyGUI::IntCoord& value) final;
void setSize(const MyGUI::IntSize& value) override;
void setCoord(const MyGUI::IntCoord& value) override;
MyGUI::delegates::CMultiDelegate2<MyGUI::Widget*, const MWWorld::Ptr&> eventItemClicked;

@ -13,7 +13,7 @@ namespace MWGui
MYGUI_RTTI_DERIVED(ItemView)
public:
ItemView();
virtual ~ItemView();
~ItemView() override;
/// Register needed components with MyGUI's factory manager
static void registerComponents ();
@ -33,12 +33,12 @@ namespace MWGui
void resetScrollBars();
private:
void initialiseOverride() final;
void initialiseOverride() override;
void layoutWidgets();
void setSize(const MyGUI::IntSize& _value) final;
void setCoord(const MyGUI::IntCoord& _value) final;
void setSize(const MyGUI::IntSize& _value) override;
void setCoord(const MyGUI::IntCoord& _value) override;
void onSelectedItem (MyGUI::Widget* sender);
void onSelectedBackground (MyGUI::Widget* sender);

@ -41,7 +41,7 @@ namespace MWGui
void setFrame (const std::string& frame, const MyGUI::IntCoord& coord);
protected:
void initialiseOverride() final;
void initialiseOverride() override;
MyGUI::ImageBox* mItem;
MyGUI::ImageBox* mItemShadow;

@ -74,12 +74,12 @@ namespace
MyGUI::Colour mNormalColour;
MyGUI::Colour mHoverColour;
void onMouseLostFocus(MyGUI::Widget* _new) final
void onMouseLostFocus(MyGUI::Widget* _new) override
{
setColour(mNormalColour);
}
void onMouseSetFocus(MyGUI::Widget* _old) final
void onMouseSetFocus(MyGUI::Widget* _old) override
{
setColour(mHoverColour);
}

@ -10,7 +10,7 @@ namespace MWGui
MYGUI_RTTI_DERIVED( AutoSizedResourceSkin )
public:
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) override;
};
}

@ -47,10 +47,10 @@ namespace MWGui
/// Fired when a spell was clicked
EventHandle_ModelIndex eventSpellClicked;
void initialiseOverride() final;
void initialiseOverride() override;
void setSize(const MyGUI::IntSize& _value) final;
void setCoord(const MyGUI::IntCoord& _value) final;
void setSize(const MyGUI::IntSize& _value) override;
void setCoord(const MyGUI::IntCoord& _value) override;
void resetScrollbars();

@ -116,7 +116,7 @@ namespace MWGui
protected:
virtual ~MWSkill();
void initialiseOverride() final;
void initialiseOverride() override;
void onClicked(MyGUI::Widget* _sender);
@ -156,7 +156,7 @@ namespace MWGui
protected:
virtual ~MWAttribute();
void initialiseOverride() final;
void initialiseOverride() override;
void onClicked(MyGUI::Widget* _sender);
@ -199,7 +199,7 @@ namespace MWGui
protected:
virtual ~MWSpell();
void initialiseOverride() final;
void initialiseOverride() override;
private:
void updateWidgets();
@ -241,7 +241,7 @@ namespace MWGui
protected:
virtual ~MWEffectList();
void initialiseOverride() final;
void initialiseOverride() override;
private:
void updateWidgets();
@ -265,7 +265,7 @@ namespace MWGui
protected:
virtual ~MWSpellEffect();
void initialiseOverride() final;
void initialiseOverride() override;
private:
static const int sIconOffset = 24;
@ -294,7 +294,7 @@ namespace MWGui
protected:
virtual ~MWDynamicStat();
void initialiseOverride() final;
void initialiseOverride() override;
private:

@ -24,15 +24,15 @@ namespace MWMechanics
public:
/// Constructor
/** \param objectId Reference to object to activate **/
AiActivate(const std::string &objectId);
explicit AiActivate(const std::string &objectId);
AiActivate(const ESM::AiSequence::AiActivate* activate);
explicit AiActivate(const ESM::AiSequence::AiActivate* activate);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Activate; }
void writeState(ESM::AiSequence::AiSequence& sequence) const final;
void writeState(ESM::AiSequence::AiSequence& sequence) const override;
private:
const std::string mObjectId;

@ -20,9 +20,9 @@ namespace MWMechanics
{
public:
/// Avoid door until the door is fully open
AiAvoidDoor(const MWWorld::ConstPtr& doorPtr);
explicit AiAvoidDoor(const MWWorld::ConstPtr& doorPtr);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::AvoidDoor; }

@ -10,7 +10,7 @@ namespace MWMechanics
class AiBreathe final : public TypedAiPackage<AiBreathe>
{
public:
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Breathe; }

@ -15,11 +15,11 @@ namespace MWMechanics
public:
AiCast(const std::string& targetId, const std::string& spellId, bool manualSpell=false);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Cast; }
MWWorld::Ptr getTarget() const final;
MWWorld::Ptr getTarget() const override;
static constexpr Options makeDefaultOptions()
{

@ -96,13 +96,13 @@ namespace MWMechanics
public:
///Constructor
/** \param actor Actor to fight **/
AiCombat(const MWWorld::Ptr& actor);
explicit AiCombat(const MWWorld::Ptr& actor);
AiCombat (const ESM::AiSequence::AiCombat* combat);
explicit AiCombat (const ESM::AiSequence::AiCombat* combat);
void init();
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Combat; }
@ -116,9 +116,9 @@ namespace MWMechanics
}
///Returns target ID
MWWorld::Ptr getTarget() const final;
MWWorld::Ptr getTarget() const override;
void writeState(ESM::AiSequence::AiSequence &sequence) const final;
void writeState(ESM::AiSequence::AiSequence &sequence) const override;
private:
/// Returns true if combat should end

@ -30,7 +30,7 @@ namespace MWMechanics
AiEscort(const ESM::AiSequence::AiEscort* escort);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Escort; }
@ -42,11 +42,11 @@ namespace MWMechanics
return options;
}
void writeState(ESM::AiSequence::AiSequence &sequence) const final;
void writeState(ESM::AiSequence::AiSequence &sequence) const override;
void fastForward(const MWWorld::Ptr& actor, AiState& state) final;
void fastForward(const MWWorld::Ptr& actor, AiState& state) override;
osg::Vec3f getDestination() const final { return osg::Vec3f(mX, mY, mZ); }
osg::Vec3f getDestination() const override { return osg::Vec3f(mX, mY, mZ); }
private:
const std::string mCellId;

@ -10,7 +10,7 @@ namespace MWMechanics
public:
AiFace(float targetX, float targetY);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Face; }

@ -53,7 +53,7 @@ namespace MWMechanics
AiFollow(const ESM::AiSequence::AiFollow* follow);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Follow; }
@ -69,15 +69,15 @@ namespace MWMechanics
/// Returns the actor being followed
std::string getFollowedActor();
void writeState (ESM::AiSequence::AiSequence& sequence) const final;
void writeState (ESM::AiSequence::AiSequence& sequence) const override;
bool isCommanded() const;
int getFollowIndex() const;
void fastForward(const MWWorld::Ptr& actor, AiState& state) final;
void fastForward(const MWWorld::Ptr& actor, AiState& state) override;
osg::Vec3f getDestination() const final
osg::Vec3f getDestination() const override
{
MWWorld::Ptr target = getTarget();
if (target.isEmpty())

@ -26,7 +26,7 @@ namespace MWMechanics
AiPursue(const ESM::AiSequence::AiPursue* pursue);
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Pursue; }
@ -38,9 +38,9 @@ namespace MWMechanics
return options;
}
MWWorld::Ptr getTarget() const final;
MWWorld::Ptr getTarget() const override;
void writeState (ESM::AiSequence::AiSequence& sequence) const final;
void writeState (ESM::AiSequence::AiSequence& sequence) const override;
};
}
#endif

@ -25,14 +25,14 @@ namespace MWMechanics
AiTravel(float x, float y, float z);
AiTravel(const ESM::AiSequence::AiTravel* travel);
explicit AiTravel(const ESM::AiSequence::AiTravel* travel);
/// Simulates the passing of time
void fastForward(const MWWorld::Ptr& actor, AiState& state) final;
void fastForward(const MWWorld::Ptr& actor, AiState& state) override;
void writeState(ESM::AiSequence::AiSequence &sequence) const final;
void writeState(ESM::AiSequence::AiSequence &sequence) const override;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute (const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Travel; }
@ -44,7 +44,7 @@ namespace MWMechanics
return options;
}
osg::Vec3f getDestination() const final { return osg::Vec3f(mX, mY, mZ); }
osg::Vec3f getDestination() const override { return osg::Vec3f(mX, mY, mZ); }
private:
const float mX;
@ -62,7 +62,7 @@ namespace MWMechanics
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::InternalTravel; }
std::unique_ptr<AiPackage> clone() const final;
std::unique_ptr<AiPackage> clone() const override;
};
}

@ -89,9 +89,9 @@ namespace MWMechanics
\param repeat Repeat wander or not **/
AiWander(int distance, int duration, int timeOfDay, const std::vector<unsigned char>& idle, bool repeat);
AiWander (const ESM::AiSequence::AiWander* wander);
explicit AiWander (const ESM::AiSequence::AiWander* wander);
bool execute(const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) final;
bool execute(const MWWorld::Ptr& actor, CharacterController& characterController, AiState& state, float duration) override;
static constexpr AiPackageTypeId getTypeId() { return AiPackageTypeId::Wander; }
@ -103,13 +103,13 @@ namespace MWMechanics
return options;
}
void writeState(ESM::AiSequence::AiSequence &sequence) const final;
void writeState(ESM::AiSequence::AiSequence &sequence) const override;
void fastForward(const MWWorld::Ptr& actor, AiState& state) final;
void fastForward(const MWWorld::Ptr& actor, AiState& state) override;
osg::Vec3f getDestination(const MWWorld::Ptr& actor) const final;
osg::Vec3f getDestination(const MWWorld::Ptr& actor) const override;
osg::Vec3f getDestination() const final
osg::Vec3f getDestination() const override
{
if (!mHasDestination)
return osg::Vec3f(0, 0, 0);

@ -35,7 +35,7 @@ namespace MWPhysics
{
}
bool process(const btBroadphaseProxy* proxy) final
bool process(const btBroadphaseProxy* proxy) override
{
if (mResult)
return false;

@ -156,17 +156,17 @@ namespace MWPhysics
/// target vector hits the collision shape and then calculates distance from the intersection point.
/// This can be used to find out how much nearer we need to move to the target for a "getHitContact" to be successful.
/// \note Only Actor targets are supported at the moment.
float getHitDistance(const osg::Vec3f& point, const MWWorld::ConstPtr& target) const final;
float getHitDistance(const osg::Vec3f& point, const MWWorld::ConstPtr& target) const override;
/// @param me Optional, a Ptr to ignore in the list of results. targets are actors to filter for, ignoring all other actors.
RayCastingResult castRay(const osg::Vec3f &from, const osg::Vec3f &to, const MWWorld::ConstPtr& ignore = MWWorld::ConstPtr(),
std::vector<MWWorld::Ptr> targets = std::vector<MWWorld::Ptr>(),
int mask = CollisionType_World|CollisionType_HeightMap|CollisionType_Actor|CollisionType_Door, int group=0xff) const final;
int mask = CollisionType_World|CollisionType_HeightMap|CollisionType_Actor|CollisionType_Door, int group=0xff) const override;
RayCastingResult castSphere(const osg::Vec3f& from, const osg::Vec3f& to, float radius) const final;
RayCastingResult castSphere(const osg::Vec3f& from, const osg::Vec3f& to, float radius) const override;
/// Return true if actor1 can see actor2.
bool getLineOfSight(const MWWorld::ConstPtr& actor1, const MWWorld::ConstPtr& actor2) const final;
bool getLineOfSight(const MWWorld::ConstPtr& actor1, const MWWorld::ConstPtr& actor2) const override;
bool isOnGround (const MWWorld::Ptr& actor);

@ -5,14 +5,14 @@ struct PartialBinarySearchTest : public ::testing::Test
{
protected:
std::vector<std::string> mDataVec;
virtual void SetUp()
void SetUp() override
{
const char* data[] = { "Head", "Chest", "Tri Head", "Tri Chest", "Bip01", "Tri Bip01" };
mDataVec = std::vector<std::string>(data, data+sizeof(data)/sizeof(data[0]));
std::sort(mDataVec.begin(), mDataVec.end(), Misc::StringUtils::ciLess);
}
virtual void TearDown()
void TearDown() override
{
}

@ -4,11 +4,11 @@
struct KeywordSearchTest : public ::testing::Test
{
protected:
virtual void SetUp()
void SetUp() override
{
}
virtual void TearDown()
void TearDown() override
{
}
};

@ -22,7 +22,7 @@ struct ContentFileTest : public ::testing::Test
{
protected:
virtual void SetUp()
void SetUp() override
{
readContentFiles();
@ -31,13 +31,13 @@ struct ContentFileTest : public ::testing::Test
readerList.resize(mContentFiles.size());
int index=0;
for (std::vector<boost::filesystem::path>::const_iterator it = mContentFiles.begin(); it != mContentFiles.end(); ++it)
for (const auto & mContentFile : mContentFiles)
{
ESM::ESMReader lEsm;
lEsm.setEncoder(nullptr);
lEsm.setIndex(index);
lEsm.setGlobalReaderList(&readerList);
lEsm.open(it->string());
lEsm.open(mContentFile.string());
readerList[index] = lEsm;
mEsmStore.load(readerList[index], &dummyListener);
@ -47,7 +47,7 @@ struct ContentFileTest : public ::testing::Test
mEsmStore.setUp();
}
virtual void TearDown()
void TearDown() override
{
}
@ -86,8 +86,8 @@ struct ContentFileTest : public ::testing::Test
Files::Collections collections (dataDirs, true);
std::vector<std::string> contentFiles = variables["content"].as<std::vector<std::string> >();
for (std::vector<std::string>::iterator it = contentFiles.begin(); it != contentFiles.end(); ++it)
mContentFiles.push_back(collections.getPath(*it));
for (auto & contentFile : contentFiles)
mContentFiles.push_back(collections.getPath(contentFile));
}
protected:
@ -111,14 +111,12 @@ TEST_F(ContentFileTest, dialogue_merging_test)
stream.open(file);
const MWWorld::Store<ESM::Dialogue>& dialStore = mEsmStore.get<ESM::Dialogue>();
for (MWWorld::Store<ESM::Dialogue>::iterator it = dialStore.begin(); it != dialStore.end(); ++it)
for (const auto & dial : dialStore)
{
const ESM::Dialogue& dial = *it;
stream << "Dialogue: " << dial.mId << std::endl;
for (ESM::Dialogue::InfoContainer::const_iterator infoIt = dial.mInfo.begin(); infoIt != dial.mInfo.end(); ++infoIt)
for (const auto & info : dial.mInfo)
{
const ESM::DialInfo& info = *infoIt;
stream << info.mId << std::endl;
}
stream << std::endl;
@ -229,7 +227,7 @@ template <typename T>
Files::IStreamPtr getEsmFile(T record, bool deleted)
{
ESM::ESMWriter writer;
std::stringstream* stream = new std::stringstream;
auto* stream = new std::stringstream;
writer.setFormat(0);
writer.save(*stream);
writer.startRecord(T::sRecordId);

@ -15,7 +15,7 @@ namespace Compiler
Context() : mExtensions (0) {}
virtual ~Context() {}
virtual ~Context() = default;
virtual bool canDeclareLocals() const = 0;
///< Is the compiler allowed to declare local variables?

@ -1,7 +1,6 @@
#include "controlparser.hpp"
#include <algorithm>
#include <iterator>
#include <stdexcept>
#include "scanner.hpp"
@ -33,7 +32,7 @@ namespace Compiler
// store code for if-cascade
Codes codes;
for (IfCodes::reverse_iterator iter (mIfCode.rbegin());
for (auto iter (mIfCode.rbegin());
iter!=mIfCode.rend(); ++iter)
{
Codes block;

@ -5,7 +5,7 @@ namespace Compiler
ErrorHandler::ErrorHandler()
: mWarnings (0), mErrors (0), mWarningsMode (1), mDowngradeErrors (false) {}
ErrorHandler::~ErrorHandler() {}
ErrorHandler::~ErrorHandler() = default;
// Was compiling successful?

@ -83,7 +83,7 @@ namespace Compiler
public:
ErrorDowngrade (ErrorHandler& handler);
explicit ErrorDowngrade (ErrorHandler& handler);
~ErrorDowngrade();
};

@ -21,7 +21,7 @@ namespace Compiler
{
public:
const char *what() const noexcept final { return "Can't read file"; }
const char *what() const noexcept override { return "Can't read file"; }
///< Return error message
};
@ -31,7 +31,7 @@ namespace Compiler
{
public:
const char *what() const noexcept final { return "End of file"; }
const char *what() const noexcept override { return "End of file"; }
///< Return error message
};
}

@ -4,8 +4,6 @@
#include <cassert>
#include <algorithm>
#include <stack>
#include <iterator>
#include <sstream>
#include <components/misc/stringops.hpp>
@ -21,7 +19,7 @@
namespace Compiler
{
int ExprParser::getPriority (char op) const
int ExprParser::getPriority (char op)
{
switch (op)
{
@ -654,28 +652,27 @@ namespace Compiler
std::stack<std::vector<Interpreter::Type_Code> > stack;
for (std::string::const_iterator iter (arguments.begin()); iter!=arguments.end();
++iter)
for (char argument : arguments)
{
if (*iter=='/')
if (argument=='/')
{
optional = true;
}
else if (*iter=='S' || *iter=='c' || *iter=='x')
else if (argument=='S' || argument=='c' || argument=='x')
{
stringParser.reset();
if (optional || *iter=='x')
if (optional || argument=='x')
stringParser.setOptional (true);
if (*iter=='c') stringParser.smashCase();
if (*iter=='x') stringParser.discard();
if (argument=='c') stringParser.smashCase();
if (argument=='x') stringParser.discard();
scanner.scan (stringParser);
if ((optional || *iter=='x') && stringParser.isEmpty())
if ((optional || argument=='x') && stringParser.isEmpty())
break;
if (*iter!='x')
if (argument!='x')
{
std::vector<Interpreter::Type_Code> tmp;
stringParser.append (tmp);
@ -689,7 +686,7 @@ namespace Compiler
getErrorHandler().warning ("Extra argument",
stringParser.getTokenLoc());
}
else if (*iter=='X')
else if (argument=='X')
{
parser.reset();
@ -702,7 +699,7 @@ namespace Compiler
else
getErrorHandler().warning("Extra argument", parser.getTokenLoc());
}
else if (*iter=='z')
else if (argument=='z')
{
discardParser.reset();
discardParser.setOptional (true);
@ -714,7 +711,7 @@ namespace Compiler
else
getErrorHandler().warning("Extra argument", discardParser.getTokenLoc());
}
else if (*iter=='j')
else if (argument=='j')
{
/// \todo disable this when operating in strict mode
junkParser.reset();
@ -737,8 +734,8 @@ namespace Compiler
char type = parser.append (tmp);
if (type!=*iter)
Generator::convert (tmp, type, *iter);
if (type!=argument)
Generator::convert (tmp, type, argument);
stack.push (tmp);

@ -28,7 +28,7 @@ namespace Compiler
bool mRefOp;
bool mMemberOp;
int getPriority (char op) const;
static int getPriority (char op) ;
char getOperandType (int Index = 0) const;

@ -12,8 +12,7 @@ namespace Compiler
int Extensions::searchKeyword (const std::string& keyword) const
{
std::map<std::string, int>::const_iterator iter = mKeywords.find (keyword);
auto iter = mKeywords.find (keyword);
if (iter==mKeywords.end())
return 0;
@ -23,8 +22,7 @@ namespace Compiler
bool Extensions::isFunction (int keyword, ScriptReturn& returnType, ScriptArgs& argumentType,
bool& explicitReference) const
{
std::map<int, Function>::const_iterator iter = mFunctions.find (keyword);
auto iter = mFunctions.find (keyword);
if (iter==mFunctions.end())
return false;
@ -39,8 +37,7 @@ namespace Compiler
bool Extensions::isInstruction (int keyword, ScriptArgs& argumentType,
bool& explicitReference) const
{
std::map<int, Instruction>::const_iterator iter = mInstructions.find (keyword);
auto iter = mInstructions.find (keyword);
if (iter==mInstructions.end())
return false;
@ -115,8 +112,7 @@ namespace Compiler
{
assert (optionalArguments>=0);
std::map<int, Function>::const_iterator iter = mFunctions.find (keyword);
auto iter = mFunctions.find (keyword);
if (iter==mFunctions.end())
throw std::logic_error ("unknown custom function keyword");
@ -164,8 +160,7 @@ namespace Compiler
{
assert (optionalArguments>=0);
std::map<int, Instruction>::const_iterator iter = mInstructions.find (keyword);
auto iter = mInstructions.find (keyword);
if (iter==mInstructions.end())
throw std::logic_error ("unknown custom instruction keyword");
@ -209,8 +204,7 @@ namespace Compiler
void Extensions::listKeywords (std::vector<std::string>& keywords) const
{
for (std::map<std::string, int>::const_iterator iter (mKeywords.begin());
iter!=mKeywords.end(); ++iter)
keywords.push_back (iter->first);
for (const auto & mKeyword : mKeywords)
keywords.push_back (mKeyword.first);
}
}

@ -2,7 +2,6 @@
#include <cassert>
#include <algorithm>
#include <iterator>
#include <stdexcept>
#include "literals.hpp"
@ -283,9 +282,7 @@ namespace
}
}
namespace Compiler
{
namespace Generator
namespace Compiler::Generator
{
void pushInt (CodeContainer& code, Literals& literals, int value)
{
@ -732,4 +729,3 @@ namespace Compiler
}
}
}
}

@ -260,7 +260,7 @@ namespace Compiler
/// \todo add option to disable this
std::unique_ptr<ErrorDowngrade> errorDowngrade (nullptr);
if (Misc::StringUtils::lowerCase (loc.mLiteral)=="positioncell")
errorDowngrade.reset (new ErrorDowngrade (getErrorHandler()));
errorDowngrade = std::make_unique<ErrorDowngrade> (getErrorHandler());
std::vector<Interpreter::Type_Code> code;
int optionals = mExprParser.parseArguments (argumentType, scanner, code, keyword);

@ -30,13 +30,11 @@ namespace Compiler
void Literals::append (std::vector<Interpreter::Type_Code>& code) const
{
for (std::vector<Interpreter::Type_Integer>::const_iterator iter (mIntegers.begin());
iter!=mIntegers.end(); ++iter)
code.push_back (*reinterpret_cast<const Interpreter::Type_Code *> (&*iter));
for (const int & mInteger : mIntegers)
code.push_back (*reinterpret_cast<const Interpreter::Type_Code *> (&mInteger));
for (std::vector<Interpreter::Type_Float>::const_iterator iter (mFloats.begin());
iter!=mFloats.end(); ++iter)
code.push_back (*reinterpret_cast<const Interpreter::Type_Code *> (&*iter));
for (const float & mFloat : mFloats)
code.push_back (*reinterpret_cast<const Interpreter::Type_Code *> (&mFloat));
int stringBlockSize = getStringSize();
int size = static_cast<int> (code.size());
@ -45,12 +43,11 @@ namespace Compiler
int offset = 0;
for (std::vector<std::string>::const_iterator iter (mStrings.begin());
iter!=mStrings.end(); ++iter)
for (const auto & mString : mStrings)
{
int stringSize = iter->size()+1;
int stringSize = mString.size()+1;
std::copy (iter->c_str(), iter->c_str()+stringSize,
std::copy (mString.c_str(), mString.c_str()+stringSize,
reinterpret_cast<char *> (&code[size]) + offset);
offset += stringSize;
}

@ -25,8 +25,7 @@ namespace Compiler
{
const std::vector<std::string>& collection = get (type);
std::vector<std::string>::const_iterator iter =
std::find (collection.begin(), collection.end(), name);
auto iter = std::find (collection.begin(), collection.end(), name);
if (iter==collection.end())
return -1;

@ -1,8 +1,6 @@
#include "opcodes.hpp"
namespace Compiler
{
namespace Control
namespace Compiler::Control
{
const char *controls[numberOfControls] =
{
@ -10,4 +8,3 @@ namespace Compiler
"playerviewswitch", "vanitymode"
};
}
}

@ -2,7 +2,6 @@
#include <cassert>
#include <algorithm>
#include <iterator>
#include "locals.hpp"

@ -58,7 +58,7 @@ namespace Compiler
// destructor
Parser::~Parser() {}
Parser::~Parser() = default;
// Handle an int token.
// \return fetch another token?

@ -1,7 +1,6 @@
#include "scanner.hpp"
#include <cassert>
#include <iterator>
#include "exception.hpp"
#include "errorhandler.hpp"
@ -266,7 +265,7 @@ namespace Compiler
"messagebox",
"set", "to",
"getsquareroot",
0
nullptr
};
bool Scanner::scanName (MultiChar& c, Parser& parser, bool& cont)

@ -28,7 +28,7 @@ namespace Compiler
blank();
}
MultiChar(const char ch)
explicit MultiChar(const char ch)
{
blank();
mData[0] = ch;
@ -36,7 +36,7 @@ namespace Compiler
mLength = getCharLength(ch);
}
int getCharLength(const char ch)
static int getCharLength(const char ch)
{
unsigned char c = ch;
if (c<=127) return 0;
@ -170,8 +170,8 @@ namespace Compiler
}
private:
char mData[4];
int mLength;
char mData[4]{};
int mLength{};
};
class Scanner
@ -251,7 +251,7 @@ namespace Compiler
public:
Scanner (ErrorHandler& errorHandler, std::istream& inputStream,
const Extensions *extensions = 0);
const Extensions *extensions = nullptr);
///< constructor
void scan (Parser& parser);

@ -1,7 +1,6 @@
#ifndef COMPILER_SCRIPTPARSER_H_INCLUDED
#define COMPILER_SCRIPTPARSER_H_INCLUDED
#include "parser.hpp"
#include "lineparser.hpp"
#include "controlparser.hpp"

@ -1,7 +1,5 @@
#include "streamerrorhandler.hpp"
#include <sstream>
#include <components/debug/debuglog.hpp>
#include "tokenloc.hpp"
@ -61,7 +59,7 @@ namespace Compiler
mContext = context;
}
StreamErrorHandler::StreamErrorHandler() {}
StreamErrorHandler::StreamErrorHandler() = default;
ContextOverride::ContextOverride(StreamErrorHandler& handler, const std::string& context) : mHandler(handler), mContext(handler.mContext)
{

@ -1,7 +1,6 @@
#include "stringparser.hpp"
#include <algorithm>
#include <iterator>
#include <components/misc/stringops.hpp>

@ -13,7 +13,7 @@ namespace Compiler
int mLine;
std::string mLiteral;
TokenLoc() : mColumn (0), mLine (0), mLiteral ("") {}
TokenLoc() : mColumn (0), mLine (0), mLiteral () {}
};
}

@ -15,7 +15,7 @@ namespace DetourNavigator
* @brief Navigator constructor initializes all internal data. Constructed object is ready to build a scene.
* @param settings allows to customize navigator work. Constructor is only place to set navigator settings.
*/
NavigatorImpl(const Settings& settings);
explicit NavigatorImpl(const Settings& settings);
void addAgent(const osg::Vec3f& agentHalfExtents) override;
@ -40,9 +40,9 @@ namespace DetourNavigator
bool removeWater(const osg::Vec2i& cellPosition) override;
void addPathgrid(const ESM::Cell& cell, const ESM::Pathgrid& pathgrid) final;
void addPathgrid(const ESM::Cell& cell, const ESM::Pathgrid& pathgrid) override;
void removePathgrid(const ESM::Pathgrid& pathgrid) final;
void removePathgrid(const ESM::Pathgrid& pathgrid) override;
void update(const osg::Vec3f& playerPosition) override;

@ -60,9 +60,9 @@ namespace DetourNavigator
return false;
}
void addPathgrid(const ESM::Cell& /*cell*/, const ESM::Pathgrid& /*pathgrid*/) final {}
void addPathgrid(const ESM::Cell& /*cell*/, const ESM::Pathgrid& /*pathgrid*/) override {}
void removePathgrid(const ESM::Pathgrid& /*pathgrid*/) final {}
void removePathgrid(const ESM::Pathgrid& /*pathgrid*/) override {}
void update(const osg::Vec3f& /*playerPosition*/) override {}

@ -12,14 +12,14 @@ namespace ESM
{
InventoryState mInventory;
void load (ESMReader &esm) final;
void save (ESMWriter &esm, bool inInventory = false) const final;
void load (ESMReader &esm) override;
void save (ESMWriter &esm, bool inInventory = false) const override;
ContainerState& asContainerState() final
ContainerState& asContainerState() override
{
return *this;
}
const ContainerState& asContainerState() const final
const ContainerState& asContainerState() const override
{
return *this;
}

@ -12,14 +12,14 @@ namespace ESM
int mSpawnActorId;
bool mSpawn;
void load (ESMReader &esm) final;
void save (ESMWriter &esm, bool inInventory = false) const final;
void load (ESMReader &esm) override;
void save (ESMWriter &esm, bool inInventory = false) const override;
CreatureLevListState& asCreatureLevListState() final
CreatureLevListState& asCreatureLevListState() override
{
return *this;
}
const CreatureLevListState& asCreatureLevListState() const final
const CreatureLevListState& asCreatureLevListState() const override
{
return *this;
}

@ -15,16 +15,16 @@ namespace ESM
CreatureStats mCreatureStats;
/// Initialize to default state
void blank();
void blank() override;
void load (ESMReader &esm) final;
void save (ESMWriter &esm, bool inInventory = false) const final;
void load (ESMReader &esm) override;
void save (ESMWriter &esm, bool inInventory = false) const override;
CreatureState& asCreatureState() final
CreatureState& asCreatureState() override
{
return *this;
}
const CreatureState& asCreatureState() const final
const CreatureState& asCreatureState() const override
{
return *this;
}

@ -11,14 +11,14 @@ namespace ESM
{
int mDoorState = 0;
void load (ESMReader &esm) final;
void save (ESMWriter &esm, bool inInventory = false) const final;
void load (ESMReader &esm) override;
void save (ESMWriter &esm, bool inInventory = false) const override;
DoorState& asDoorState() final
DoorState& asDoorState() override
{
return *this;
}
const DoorState& asDoorState() const final
const DoorState& asDoorState() const override
{
return *this;
}

@ -17,16 +17,16 @@ namespace ESM
CreatureStats mCreatureStats;
/// Initialize to default state
void blank();
void blank() override;
void load (ESMReader &esm) final;
void save (ESMWriter &esm, bool inInventory = false) const final;
void load (ESMReader &esm) override;
void save (ESMWriter &esm, bool inInventory = false) const override;
NpcState& asNpcState() final
NpcState& asNpcState() override
{
return *this;
}
const NpcState& asNpcState() const final
const NpcState& asNpcState() const override
{
return *this;
}

@ -49,7 +49,7 @@ namespace ESM
virtual void save (ESMWriter &esm, bool inInventory = false) const;
/// Initialize to default state
virtual /// Initialize to default state
void blank();
virtual ~ObjectState();

@ -20,9 +20,9 @@ namespace osgMyGUI
MYGUI_RTTI_DERIVED( AdditiveLayer )
AdditiveLayer();
~AdditiveLayer();
~AdditiveLayer() override;
void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) final;
void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) override;
private:
osg::ref_ptr<osg::StateSet> mStateSet;

@ -13,13 +13,13 @@ namespace osgMyGUI
public:
MYGUI_RTTI_DERIVED(ScalingLayer)
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) final;
void deserialization(MyGUI::xml::ElementPtr _node, MyGUI::Version _version) override;
MyGUI::ILayerItem* getLayerItemByPoint(int _left, int _top) const final;
MyGUI::IntPoint getPosition(int _left, int _top) const final;
void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) final;
MyGUI::ILayerItem* getLayerItemByPoint(int _left, int _top) const override;
MyGUI::IntPoint getPosition(int _left, int _top) const override;
void renderToTarget(MyGUI::IRenderTarget* _target, bool _update) override;
void resizeView(const MyGUI::IntSize& _viewSize) final;
void resizeView(const MyGUI::IntSize& _viewSize) override;
private:
void screenToLayerCoords(int& _left, int& _top) const;

@ -46,11 +46,11 @@ namespace Gui
MYGUI_RTTI_DERIVED( AutoSizedTextBox )
public:
MyGUI::IntSize getRequestedSize() final;
void setCaption(const MyGUI::UString& _value) final;
MyGUI::IntSize getRequestedSize() override;
void setCaption(const MyGUI::UString& _value) override;
protected:
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
std::string mFontSize;
};
@ -60,13 +60,13 @@ namespace Gui
public:
MyGUI::IntSize getRequestedSize() final;
void setCaption(const MyGUI::UString& _value) final;
MyGUI::IntSize getRequestedSize() override;
void setCaption(const MyGUI::UString& _value) override;
void initialiseOverride() final;
void initialiseOverride() override;
protected:
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
int getWidth();
std::string mFontSize;
bool mShrink = false;
@ -79,11 +79,11 @@ namespace Gui
MYGUI_RTTI_DERIVED( AutoSizedButton )
public:
MyGUI::IntSize getRequestedSize() final;
void setCaption(const MyGUI::UString& _value) final;
MyGUI::IntSize getRequestedSize() override;
void setCaption(const MyGUI::UString& _value) override;
protected:
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
std::string mFontSize;
};
@ -118,7 +118,7 @@ namespace Gui
public:
Spacer();
MyGUI::IntSize getRequestedSize() final { return MyGUI::IntSize(0,0); }
MyGUI::IntSize getRequestedSize() override { return MyGUI::IntSize(0,0); }
};
class HBox : public Box, public MyGUI::Widget
@ -126,18 +126,18 @@ namespace Gui
MYGUI_RTTI_DERIVED( HBox )
public:
void setSize (const MyGUI::IntSize &_value) final;
void setCoord (const MyGUI::IntCoord &_value) final;
void setSize (const MyGUI::IntSize &_value) override;
void setCoord (const MyGUI::IntCoord &_value) override;
protected:
void initialiseOverride() final;
void initialiseOverride() override;
void align() final;
MyGUI::IntSize getRequestedSize() final;
void align() override;
MyGUI::IntSize getRequestedSize() override;
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
void onWidgetCreated(MyGUI::Widget* _widget) final;
void onWidgetCreated(MyGUI::Widget* _widget) override;
};
class VBox : public Box, public MyGUI::Widget
@ -145,18 +145,18 @@ namespace Gui
MYGUI_RTTI_DERIVED( VBox)
public:
void setSize (const MyGUI::IntSize &_value) final;
void setCoord (const MyGUI::IntCoord &_value) final;
void setSize (const MyGUI::IntSize &_value) override;
void setCoord (const MyGUI::IntCoord &_value) override;
protected:
void initialiseOverride() final;
void initialiseOverride() override;
void align() final;
MyGUI::IntSize getRequestedSize() final;
void align() override;
MyGUI::IntSize getRequestedSize() override;
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
void onWidgetCreated(MyGUI::Widget* _widget) final;
void onWidgetCreated(MyGUI::Widget* _widget) override;
};
}

@ -31,13 +31,13 @@ namespace Gui
static bool sDefaultNeedKeyFocus;
protected:
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void onMouseLostFocus(MyGUI::Widget* _new) final;
void onMouseSetFocus(MyGUI::Widget* _old) final;
void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) final;
void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) final;
void onKeySetFocus(MyGUI::Widget* _old) final;
void onKeyLostFocus(MyGUI::Widget* _new) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
void onMouseLostFocus(MyGUI::Widget* _new) override;
void onMouseSetFocus(MyGUI::Widget* _old) override;
void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) override;
void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) override;
void onKeySetFocus(MyGUI::Widget* _old) override;
void onKeyLostFocus(MyGUI::Widget* _new) override;
std::string mImageHighlighted;
std::string mImageNormal;

@ -48,10 +48,10 @@ namespace Gui
void scrollToTop();
void setPropertyOverride(const std::string& _key, const std::string& _value) final;
void setPropertyOverride(const std::string& _key, const std::string& _value) override;
protected:
void initialiseOverride() final;
void initialiseOverride() override;
void redraw(bool scrollbarShown = false);

@ -22,8 +22,8 @@ namespace Gui
{
}
void initialiseOverride() final;
void shutdownOverride() final;
void initialiseOverride() override;
void shutdownOverride() override;
typedef MyGUI::delegates::CMultiDelegate1<int> EventHandle_ValueChanged;
EventHandle_ValueChanged eventValueChanged;
@ -36,8 +36,8 @@ namespace Gui
void setMaxValue(int maxValue);
private:
void onEditTextChange(MyGUI::EditBox* sender);
void onKeyLostFocus(MyGUI::Widget* _new) final;
void onKeyButtonPressed(MyGUI::KeyCode key, MyGUI::Char character) final;
void onKeyLostFocus(MyGUI::Widget* _new) override;
void onKeyButtonPressed(MyGUI::KeyCode key, MyGUI::Char character) override;
int mValue;

@ -23,13 +23,13 @@ namespace Gui
protected:
void updateButtonState();
void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) final;
void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) final;
void onMouseSetFocus(MyGUI::Widget* _old) final;
void onMouseLostFocus(MyGUI::Widget* _new) final;
void baseUpdateEnable() final;
void onMouseButtonPressed(int _left, int _top, MyGUI::MouseButton _id) override;
void onMouseButtonReleased(int _left, int _top, MyGUI::MouseButton _id) override;
void onMouseSetFocus(MyGUI::Widget* _old) override;
void onMouseLostFocus(MyGUI::Widget* _new) override;
void baseUpdateEnable() override;
void shutdownOverride() final;
void shutdownOverride() override;
bool _setState(const std::string &_value);

@ -14,11 +14,11 @@ namespace Gui
public:
WindowCaption();
void setCaption(const MyGUI::UString &_value) final;
void initialiseOverride() final;
void setCaption(const MyGUI::UString &_value) override;
void initialiseOverride() override;
void setSize(const MyGUI::IntSize& _value) final;
void setCoord(const MyGUI::IntCoord& _value) final;
void setSize(const MyGUI::IntSize& _value) override;
void setCoord(const MyGUI::IntCoord& _value) override;
private:
MyGUI::Widget* mLeft;

Loading…
Cancel
Save