diff --git a/src/CBot/CBotClass.h b/src/CBot/CBotClass.h index fbf03f1f..d62240d3 100644 --- a/src/CBot/CBotClass.h +++ b/src/CBot/CBotClass.h @@ -307,7 +307,7 @@ public: * \brief Get the list of user-defined methods in this class. * \return List of methods, can be empty. */ - const std::list& GetFunctions(); + const std::list& GetFunctions() const; /*! * \brief CompileDefItem diff --git a/src/CBot/CBotInstr/CBotFunction.cpp b/src/CBot/CBotInstr/CBotFunction.cpp index 5028fa1b..631b1438 100644 --- a/src/CBot/CBotInstr/CBotFunction.cpp +++ b/src/CBot/CBotInstr/CBotFunction.cpp @@ -77,13 +77,13 @@ bool CBotFunction::IsPublic() } //////////////////////////////////////////////////////////////////////////////// -bool CBotFunction::IsProtected() +bool CBotFunction::IsProtected() const { return m_bProtect; } //////////////////////////////////////////////////////////////////////////////// -bool CBotFunction::IsPrivate() +bool CBotFunction::IsPrivate() const { return m_bPrivate; } @@ -1206,7 +1206,7 @@ std::string CBotFunction::GetParams() } //////////////////////////////////////////////////////////////////////////////// -const std::string& CBotFunction::GetClassName() +const std::string& CBotFunction::GetClassName() const { return m_MasterClass; } diff --git a/src/CBot/CBotInstr/CBotFunction.h b/src/CBot/CBotInstr/CBotFunction.h index 29c2b15d..4c2ae3f0 100644 --- a/src/CBot/CBotInstr/CBotFunction.h +++ b/src/CBot/CBotInstr/CBotFunction.h @@ -275,7 +275,7 @@ public: * \brief Get the name of the class for a method. * \return The name of a class or empty string if it's not a method. */ - const std::string& GetClassName(); + const std::string& GetClassName() const; /*! * \brief IsPublic @@ -287,13 +287,13 @@ public: * \brief Check if a method is protected. * \return true if a method was compiled with "protected" keyword. */ - bool IsProtected(); + bool IsProtected() const; /*! * \brief Check if a method is private. * \return true if a method was compiled with "private" keyword. */ - bool IsPrivate(); + bool IsPrivate() const; /*! * \brief IsExtern