fix passing std::string by value

pull/2/head
weidai 2003-07-19 00:30:19 +00:00
parent 55a22f2adf
commit de02be700e
1 changed files with 2 additions and 2 deletions

View File

@ -174,7 +174,7 @@ public:
class CRYPTOPP_DLL OS_Error : public Exception class CRYPTOPP_DLL OS_Error : public Exception
{ {
public: 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) {} : Exception(errorType, s), m_operation(operation), m_errorCode(errorCode) {}
~OS_Error() throw() {} ~OS_Error() throw() {}
@ -225,7 +225,7 @@ public:
class CRYPTOPP_DLL ValueTypeMismatch : public InvalidArgument class CRYPTOPP_DLL ValueTypeMismatch : public InvalidArgument
{ {
public: 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() + "'") : InvalidArgument("NameValuePairs: type mismatch for '" + name + "', stored '" + stored.name() + "', trying to retrieve '" + retrieving.name() + "'")
, m_stored(stored), m_retrieving(retrieving) {} , m_stored(stored), m_retrieving(retrieving) {}