From 88581a4c4202f93ab53507b637e3aecc94b0e2aa Mon Sep 17 00:00:00 2001 From: cutealien Date: Wed, 2 Apr 2014 19:23:20 +0000 Subject: [PATCH] IGUIEnvironment::hasFocus can work with a const pointer. git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4755 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/IGUIEnvironment.h | 2 +- source/Irrlicht/CGUIEnvironment.cpp | 4 ++-- source/Irrlicht/CGUIEnvironment.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/IGUIEnvironment.h b/include/IGUIEnvironment.h index b4262515..e2b89cc1 100644 --- a/include/IGUIEnvironment.h +++ b/include/IGUIEnvironment.h @@ -105,7 +105,7 @@ public: /** \param element Pointer to the element which is tested. \param checkSubElements When true and focus is on a sub-element of element then it will still count as focused and return true \return True if the element has focus, else false. */ - virtual bool hasFocus(IGUIElement* element, bool checkSubElements=false) const = 0; + virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const = 0; //! Returns the current video driver. /** \return Pointer to the video driver. */ diff --git a/source/Irrlicht/CGUIEnvironment.cpp b/source/Irrlicht/CGUIEnvironment.cpp index 3c9b7d84..de804b28 100644 --- a/source/Irrlicht/CGUIEnvironment.cpp +++ b/source/Irrlicht/CGUIEnvironment.cpp @@ -331,7 +331,7 @@ bool CGUIEnvironment::removeFocus(IGUIElement* element) //! Returns whether the element has focus -bool CGUIEnvironment::hasFocus(IGUIElement* element, bool checkSubElements) const +bool CGUIEnvironment::hasFocus(const IGUIElement* element, bool checkSubElements) const { _IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX; if (element == Focus) @@ -941,7 +941,7 @@ void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node) { if (!(*it)->isSubElement()) { - writer->writeLineBreak(); + writer->writeLineBreak(); writeGUIElement(writer, (*it)); } } diff --git a/source/Irrlicht/CGUIEnvironment.h b/source/Irrlicht/CGUIEnvironment.h index dd317250..e6ddb550 100644 --- a/source/Irrlicht/CGUIEnvironment.h +++ b/source/Irrlicht/CGUIEnvironment.h @@ -190,7 +190,7 @@ public: virtual bool removeFocus(IGUIElement* element) _IRR_OVERRIDE_; //! Returns if the element has focus - virtual bool hasFocus(IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_; + virtual bool hasFocus(const IGUIElement* element, bool checkSubElements=false) const _IRR_OVERRIDE_; //! Returns the element with the focus virtual IGUIElement* getFocus() const _IRR_OVERRIDE_;