[Base] Make Application::Messages non-copyable

This commit is contained in:
Ray Speth 2016-07-29 12:04:31 -04:00
parent e851e5e9d8
commit fe15a4fe9c
2 changed files with 2 additions and 20 deletions

View file

@ -59,24 +59,6 @@ Application::Messages::Messages()
logwriter.reset(new Logger());
}
Application::Messages::Messages(const Messages& r) :
errorMessage(r.errorMessage)
{
// install a default logwriter that writes to standard
// output / standard error
logwriter.reset(new Logger(*r.logwriter));
}
Application::Messages& Application::Messages::operator=(const Messages& r)
{
if (this == &r) {
return *this;
}
errorMessage = r.errorMessage;
logwriter.reset(new Logger(*r.logwriter));
return *this;
}
void Application::Messages::addError(const std::string& r, const std::string& msg)
{
if (msg.size() != 0) {

View file

@ -44,8 +44,8 @@ protected:
public:
Messages();
Messages(const Messages& r);
Messages& operator=(const Messages& r);
Messages(const Messages& r) = delete;
Messages& operator=(const Messages& r) = delete;
//! Set an error condition in the application class without
//! throwing an exception.