From af0917623ac806e35a88efe8983b16965c92ec0d Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 28 Jan 2010 11:33:12 +0100 Subject: make string constructor argument a constant reference --- src/base/songloading/songloader.hpp | 2 +- src/utils/base_exception.cpp | 2 +- src/utils/base_exception.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/songloading/songloader.hpp b/src/base/songloading/songloader.hpp index bbe7dfcb..57afdefe 100644 --- a/src/base/songloading/songloader.hpp +++ b/src/base/songloading/songloader.hpp @@ -38,7 +38,7 @@ namespace usdx class NoStrategyException : public BaseException { public: - NoStrategyException(std::string message) : BaseException(message) {}; + NoStrategyException(const std::string& message) : BaseException(message) {}; ~NoStrategyException () throw () {}; }; diff --git a/src/utils/base_exception.cpp b/src/utils/base_exception.cpp index e00ba716..6f60c157 100644 --- a/src/utils/base_exception.cpp +++ b/src/utils/base_exception.cpp @@ -28,7 +28,7 @@ namespace usdx { - BaseException::BaseException(std::string message) : message(message) + BaseException::BaseException(const std::string& message) : message(message) { } diff --git a/src/utils/base_exception.hpp b/src/utils/base_exception.hpp index 44f3c2b7..08e4b371 100644 --- a/src/utils/base_exception.hpp +++ b/src/utils/base_exception.hpp @@ -38,7 +38,7 @@ namespace usdx std::string message; protected: - BaseException(std::string message); + BaseException(const std::string& message); public: ~BaseException() throw (); -- cgit v1.2.3