diff options
author | Carl Hetherington <carl@carlh.net> | 2010-08-07 23:30:12 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-08-07 23:30:12 +0000 |
commit | 66aeda8d8ad1f029232888ab823623da9615fb3c (patch) | |
tree | 6207c5f3ea176d20a62895355ab5073d21118fe7 /libs | |
parent | 54d019cdd6e6aa5a7bd3c8775bb4cde1782d3e68 (diff) |
Allow local-scope strings to be passed in as constructor parameters.
git-svn-id: svn://localhost/ardour2/branches/3.0@7559 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs')
-rw-r--r-- | libs/ardour/ardour/audioengine.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libs/ardour/ardour/audioengine.h b/libs/ardour/ardour/audioengine.h index fcbe6d3514..0226e23282 100644 --- a/libs/ardour/ardour/audioengine.h +++ b/libs/ardour/ardour/audioengine.h @@ -135,13 +135,15 @@ class AudioEngine : public SessionHandlePtr class PortRegistrationFailure : public std::exception { public: - PortRegistrationFailure (const char* why = "") { - reason = why; - } - virtual const char *what() const throw() { return reason; } + PortRegistrationFailure (std::string const & why = "") + : reason (why) {} + + ~PortRegistrationFailure () throw () {} + + virtual const char *what() const throw () { return reason.c_str(); } private: - const char* reason; + std::string reason; }; class NoBackendAvailable : public std::exception { |