From de02be700e174e95694dc65952cabe4eae4d465c Mon Sep 17 00:00:00 2001 From: weidai Date: Sat, 19 Jul 2003 00:30:19 +0000 Subject: [PATCH] fix passing std::string by value --- cryptlib.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cryptlib.h b/cryptlib.h index f2479e88..4c0e24aa 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -174,7 +174,7 @@ public: class CRYPTOPP_DLL OS_Error : public Exception { public: - OS_Error(ErrorType errorType, const std::string s, const std::string& operation, int errorCode) + OS_Error(ErrorType errorType, const std::string &s, const std::string& operation, int errorCode) : Exception(errorType, s), m_operation(operation), m_errorCode(errorCode) {} ~OS_Error() throw() {} @@ -225,7 +225,7 @@ public: class CRYPTOPP_DLL ValueTypeMismatch : public InvalidArgument { public: - ValueTypeMismatch(std::string name, const std::type_info &stored, const std::type_info &retrieving) + ValueTypeMismatch(const std::string &name, const std::type_info &stored, const std::type_info &retrieving) : InvalidArgument("NameValuePairs: type mismatch for '" + name + "', stored '" + stored.name() + "', trying to retrieve '" + retrieving.name() + "'") , m_stored(stored), m_retrieving(retrieving) {}