diff options
author | randomdan <randomdan@localhost> | 2014-01-10 13:46:22 +0000 |
---|---|---|
committer | randomdan <randomdan@localhost> | 2014-01-10 13:46:22 +0000 |
commit | 97fd7af3f653a8d4c1a15762710df2bdee58ec5a (patch) | |
tree | 17b052116dc88de8286fc1a1060441298400daa7 | |
parent | Explicit instantiations of instance store/map/set to avoid multiple instantia... (diff) | |
download | project2-97fd7af3f653a8d4c1a15762710df2bdee58ec5a.tar.bz2 project2-97fd7af3f653a8d4c1a15762710df2bdee58ec5a.tar.xz project2-97fd7af3f653a8d4c1a15762710df2bdee58ec5a.zip |
Remove boost::format bloat by centralizeing construction
-rw-r--r-- | project2/common/logger.cpp | 1 | ||||
-rw-r--r-- | 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 <boost/format.hpp> #include "intrusivePtrBase.h" #include "genLoader.h" +#include <misc.h> /// Base class for classes providing a logging facility class LogDriverBase : public virtual IntrusivePtrBase { @@ -39,8 +40,8 @@ class Log { template <typename... Args> 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<boost::format> fmt = getFormat(msgfmt); + messagebf(priority, *fmt, args...); } void vmessagef(int priority, const char * msgfmt, va_list) const; |