mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Fix warnings produced with -Weffc++ in fairmq, base/MQ and Tutorial3.
Remaining warnings originate from boost::msm and boost::mpl. Also, warnings with missing initializer list entries for DeviceOptions are false positives, since those are PODs.
This commit is contained in:
committed by
Florian Uhlig
parent
a8854d36ac
commit
ce58ee2302
@@ -17,11 +17,8 @@
|
||||
|
||||
#include "FairMQLogger.h"
|
||||
|
||||
using std::string;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
|
||||
FairMQLogger::FairMQLogger()
|
||||
: os()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -30,7 +27,7 @@ FairMQLogger::~FairMQLogger()
|
||||
cout << os.str() << endl;
|
||||
}
|
||||
|
||||
std::ostringstream& FairMQLogger::Log(int type)
|
||||
ostringstream& FairMQLogger::Log(int type)
|
||||
{
|
||||
string type_str;
|
||||
switch (type)
|
||||
@@ -56,10 +53,10 @@ std::ostringstream& FairMQLogger::Log(int type)
|
||||
timestamp_t tm = get_timestamp();
|
||||
timestamp_t ms = tm / 1000.0L;
|
||||
timestamp_t s = ms / 1000.0L;
|
||||
std::time_t t = s;
|
||||
// std::size_t fractional_seconds = ms % 1000;
|
||||
time_t t = s;
|
||||
// size_t fractional_seconds = ms % 1000;
|
||||
char mbstr[100];
|
||||
std::strftime(mbstr, 100, "%H:%M:%S", std::localtime(&t));
|
||||
strftime(mbstr, 100, "%H:%M:%S", localtime(&t));
|
||||
|
||||
os << "[\033[01;36m" << mbstr << "\033[0m]"
|
||||
<< "[" << type_str << "]"
|
||||
|
Reference in New Issue
Block a user