From b586897948b90a5765dc4af86a7762a57fa4f7d6 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Thu, 10 Apr 2014 12:27:05 +0400 Subject: [PATCH] Removed sstream from can_io --- libuavcan/src/transport/uc_can_io.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libuavcan/src/transport/uc_can_io.cpp b/libuavcan/src/transport/uc_can_io.cpp index e3a45a4ef5..1d63196643 100644 --- a/libuavcan/src/transport/uc_can_io.cpp +++ b/libuavcan/src/transport/uc_can_io.cpp @@ -4,7 +4,7 @@ */ #include -#include +#include #include #include #include @@ -17,10 +17,13 @@ namespace uavcan */ std::string CanRxFrame::toString(StringRepresentation mode) const { - std::ostringstream os; - os << CanFrame::toString(mode) - << " ts_m=" << ts_mono << " ts_utc=" << ts_utc << " iface=" << int(iface_index); - return os.str(); + std::string out = CanFrame::toString(mode); + out.reserve(128); + out += " ts_m=" + ts_mono.toString(); + out += " ts_utc=" + ts_utc.toString(); + out += " iface="; + out += '0' + iface_index; + return out; } /*