From 97e8518c1961c3d1ff7b3a0ad4e04ee2880c1fc4 Mon Sep 17 00:00:00 2001 From: attilamolnar Date: Sun, 30 Sep 2012 02:47:10 +0200 Subject: m_spanningtree Return const references from several TreeServer getter functions --- src/modules/m_spanningtree/treeserver.cpp | 6 +++--- src/modules/m_spanningtree/treeserver.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/modules/m_spanningtree/treeserver.cpp b/src/modules/m_spanningtree/treeserver.cpp index 37d81663b..65e119149 100644 --- a/src/modules/m_spanningtree/treeserver.cpp +++ b/src/modules/m_spanningtree/treeserver.cpp @@ -128,7 +128,7 @@ TreeServer::TreeServer(SpanningTreeUtilities* Util, std::string Name, std::strin SetID(id); } -std::string& TreeServer::GetID() +const std::string& TreeServer::GetID() { return sid; } @@ -226,12 +226,12 @@ std::string TreeServer::GetName() return ServerName.c_str(); } -std::string TreeServer::GetDesc() +const std::string& TreeServer::GetDesc() { return ServerDesc; } -std::string TreeServer::GetVersion() +const std::string& TreeServer::GetVersion() { return VersionString; } diff --git a/src/modules/m_spanningtree/treeserver.h b/src/modules/m_spanningtree/treeserver.h index 943267cfd..60b6d1def 100644 --- a/src/modules/m_spanningtree/treeserver.h +++ b/src/modules/m_spanningtree/treeserver.h @@ -105,11 +105,11 @@ class TreeServer : public classbase /** Get server description (GECOS) */ - std::string GetDesc(); + const std::string& GetDesc(); /** Get server version string */ - std::string GetVersion(); + const std::string& GetVersion(); /** Set time we are next due to ping this server */ @@ -197,7 +197,7 @@ class TreeServer : public classbase /** Get server ID */ - std::string& GetID(); + const std::string& GetID(); /** Marks a server as having finished bursting and performs appropriate actions. */ -- cgit v1.2.3