From 27de764c82c6cc9161afada63a09bd5da78b3eea Mon Sep 17 00:00:00 2001 From: corentinberge <33965571+corentinberge@users.noreply.github.com> Date: Mon, 12 Aug 2019 14:39:04 +0200 Subject: [PATCH] Update logger.cpp Change the input mode to ostringstream --- src/debug/logger.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp index b4c2fc3b..44f8f710 100644 --- a/src/debug/logger.cpp +++ b/src/debug/logger.cpp @@ -12,6 +12,7 @@ #endif #define ENABLE_RT_LOG +#include <sstream> #include <stdio.h> #include <iostream> #include <iomanip> // std::setprecision @@ -65,7 +66,9 @@ namespace dynamicgraph if( isStreamMsg(type)) { // check whether counter already exists - string id = file+toString(line); + std::ostringstream oss; + oss << file << line; + std::string id (oss.str()); map<string,double>::iterator it = m_stream_msg_counters.find(id); if(it == m_stream_msg_counters.end()) { -- GitLab