Skip to content

Commit

Permalink
Object: add GetNameStr() function returns std::string
Browse files Browse the repository at this point in the history
  • Loading branch information
boxa committed Mar 12, 2017
1 parent e54e376 commit 86896eb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/Object.h
Expand Up @@ -526,7 +526,8 @@ class MANGOS_DLL_SPEC WorldObject : public Object

InstanceData* GetInstanceData() const;

const char* GetName() const { return m_name.c_str(); }
char const* GetName() const { return m_name.c_str(); }
std::string const& GetNameStr() const { return m_name; }
void SetName(const std::string& newname) { m_name = newname; }

virtual const char* GetNameForLocaleIdx(int32 /*locale_idx*/) const { return GetName(); }
Expand Down

0 comments on commit 86896eb

Please sign in to comment.