summaryrefslogtreecommitdiff
path: root/src/lib/log.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 01:14:06 +0100
commit5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f (patch)
tree769dca1358e35017ce5a5b3ab2dfafe2b24d61ed /src/lib/log.cc
parent4e83acad0c2a5c528709a175a80261b8147d3b49 (diff)
Use make_shared<>.
Diffstat (limited to 'src/lib/log.cc')
-rw-r--r--src/lib/log.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/log.cc b/src/lib/log.cc
index b7edd4e29..769852044 100644
--- a/src/lib/log.cc
+++ b/src/lib/log.cc
@@ -27,6 +27,7 @@
#include "config.h"
#include "safe_stringstream.h"
#include "string_log_entry.h"
+#include <boost/make_shared.hpp>
#include <time.h>
#include <cstdio>
@@ -35,6 +36,7 @@
using std::string;
using std::cout;
using boost::shared_ptr;
+using boost::make_shared;
Log::Log ()
: _types (0)
@@ -71,7 +73,7 @@ Log::log (string message, int type)
return;
}
- shared_ptr<StringLogEntry> e (new StringLogEntry (type, message));
+ shared_ptr<StringLogEntry> e = boost::make_shared<StringLogEntry> (type, message);
do_log (e);
}
@@ -81,13 +83,13 @@ Log::dcp_log (dcp::NoteType type, string m)
{
switch (type) {
case dcp::DCP_PROGRESS:
- do_log (shared_ptr<const LogEntry> (new StringLogEntry (LogEntry::TYPE_GENERAL, m)));
+ do_log (boost::make_shared<const StringLogEntry> (LogEntry::TYPE_GENERAL, m));
break;
case dcp::DCP_ERROR:
- do_log (shared_ptr<const LogEntry> (new StringLogEntry (LogEntry::TYPE_ERROR, m)));
+ do_log (boost::make_shared<const StringLogEntry> (LogEntry::TYPE_ERROR, m));
break;
case dcp::DCP_NOTE:
- do_log (shared_ptr<const LogEntry> (new StringLogEntry (LogEntry::TYPE_WARNING, m)));
+ do_log (boost::make_shared<const StringLogEntry> (LogEntry::TYPE_WARNING, m));
break;
}
}