mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-05-29 07:25:55 +02:00
Use const char* version of msgpack::unpack_error to avoid std::string memory allocation when usr C++11 compiler.
See http://www.cplusplus.com/reference/stdexcept/runtime_error/?kw=runtime_error
This commit is contained in:
parent
b27c87c9ed
commit
e4d32b176e
@ -727,8 +727,13 @@ private:
|
||||
|
||||
|
||||
struct unpack_error : public std::runtime_error {
|
||||
#if defined(MSGPACK_USE_CPP03)
|
||||
unpack_error(const std::string& msg) :
|
||||
std::runtime_error(msg) { }
|
||||
#else
|
||||
unpack_error(const char* msg) :
|
||||
std::runtime_error(msg) { }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user