From 97fd7af3f653a8d4c1a15762710df2bdee58ec5a Mon Sep 17 00:00:00 2001 From: randomdan Date: Fri, 10 Jan 2014 13:46:22 +0000 Subject: Remove boost::format bloat by centralizeing construction --- project2/common/logger.cpp | 1 - project2/common/logger.h | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/project2/common/logger.cpp b/project2/common/logger.cpp index a9c797a..dcdd1ab 100644 --- a/project2/common/logger.cpp +++ b/project2/common/logger.cpp @@ -54,7 +54,6 @@ Log::message(int priority, const char * msg) const l.second->message(priority, msg); } } - void Log::messagebf(int priority, const boost::format & f) const { diff --git a/project2/common/logger.h b/project2/common/logger.h index 8e81bdc..cac35ad 100644 --- a/project2/common/logger.h +++ b/project2/common/logger.h @@ -9,6 +9,7 @@ #include #include "intrusivePtrBase.h" #include "genLoader.h" +#include /// Base class for classes providing a logging facility class LogDriverBase : public virtual IntrusivePtrBase { @@ -39,8 +40,8 @@ class Log { template void messagebf(int priority, const char * msgfmt, const Args & ... args) const { if (priority > lowestLevel) return; - boost::format fmt(msgfmt); - messagebf(priority, fmt, args...); + boost::shared_ptr fmt = getFormat(msgfmt); + messagebf(priority, *fmt, args...); } void vmessagef(int priority, const char * msgfmt, va_list) const; -- cgit v1.2.3