diff options
author | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 13:34:10 +0000 |
---|---|---|
committer | om <om@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-07-07 13:34:10 +0000 |
commit | 56ded38a45a89b428ff45e31b138483a76ba4587 (patch) | |
tree | 77761246a26de86af0c5af0990ae349f6e642263 | |
parent | 13153694df045d24217658077c7d223d269504b5 (diff) |
change std::string's to const std::string references for *Feature() funcs
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4121 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r-- | include/modules.h | 6 | ||||
-rw-r--r-- | src/modules.cpp | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/modules.h b/include/modules.h index 6edfcc55f..a04fd0c1e 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1320,14 +1320,14 @@ class Server : public classbase * @returns True on success, false if the feature is already published by * another module. */ - bool PublishFeature(std::string FeatureName, Module* Mod); + bool PublishFeature(const std::string &FeatureName, Module* Mod); /** Unpublish a 'feature'. * When your module exits, it must call this method for every feature it * is providing so that the feature table is cleaned up. * @param FeatureName the feature to remove */ - bool UnpublishFeature(std::string FeatureName); + bool UnpublishFeature(const std::string &FeatureName); /** Find a 'feature'. * There are two ways for a module to find another module it depends on. @@ -1341,7 +1341,7 @@ class Server : public classbase * @param FeatureName The feature name you wish to obtain the module for * @returns A pointer to a valid module class on success, NULL on failure. */ - Module* FindFeature(std::string FeatureName); + Module* FindFeature(const std::string &FeatureName); /** Writes a log string. * This method writes a line of text to the log. If the level given is lower than the diff --git a/src/modules.cpp b/src/modules.cpp index 4e98696bd..ddfbb173b 100644 --- a/src/modules.cpp +++ b/src/modules.cpp @@ -351,7 +351,7 @@ long Server::PriorityBefore(const std::string &modulename) return PRIORITY_DONTCARE; } -bool Server::PublishFeature(std::string FeatureName, Module* Mod) +bool Server::PublishFeature(const std::string &FeatureName, Module* Mod) { if (Features.find(FeatureName) == Features.end()) { @@ -361,7 +361,7 @@ bool Server::PublishFeature(std::string FeatureName, Module* Mod) return false; } -bool Server::UnpublishFeature(std::string FeatureName) +bool Server::UnpublishFeature(const std::string &FeatureName) { featurelist::iterator iter = Features.find(FeatureName); @@ -372,7 +372,7 @@ bool Server::UnpublishFeature(std::string FeatureName) return true; } -Module* Server::FindFeature(std::string FeatureName) +Module* Server::FindFeature(const std::string &FeatureName) { featurelist::iterator iter = Features.find(FeatureName); |