Removing all dirty 'using namespace std' that were used as C++ library compatibility work-around

This commit is contained in:
Pavel Kirienko
2015-03-21 14:08:37 +03:00
parent 23dd75f1b0
commit ec9006381b
30 changed files with 32 additions and 38 deletions
-2
View File
@@ -59,8 +59,6 @@ bool CanFrame::priorityHigherThan(const CanFrame& rhs) const
#if UAVCAN_TOSTRING
std::string CanFrame::toString(StringRepresentation mode) const
{
using namespace std; // For snprintf()
UAVCAN_ASSERT(mode == StrTight || mode == StrAligned);
static const unsigned AsciiColumnOffset = 36U;
-1
View File
@@ -198,7 +198,6 @@ bool Frame::operator==(const Frame& rhs) const
#if UAVCAN_TOSTRING
std::string Frame::toString() const
{
using namespace std; // For snprintf()
/*
* Frame ID fields, according to UAVCAN specs:
* - Data Type ID
@@ -12,7 +12,6 @@ namespace uavcan
#if UAVCAN_TOSTRING
std::string OutgoingTransferRegistryKey::toString() const
{
using namespace std;
char buf[40];
(void)snprintf(buf, sizeof(buf), "dtid=%u tt=%u dnid=%u",
int(data_type_id_.get()), int(transfer_type_), int(destination_node_id_.get()));
@@ -14,7 +14,6 @@ namespace uavcan
#if UAVCAN_TOSTRING
std::string TransferBufferManagerKey::toString() const
{
using namespace std; // For snprintf()
char buf[24];
(void)snprintf(buf, sizeof(buf), "nid=%i tt=%i", int(node_id_.get()), int(transfer_type_));
return std::string(buf);
-1
View File
@@ -111,7 +111,6 @@ std::string DataTypeDescriptor::toString() const
}
}
using namespace std; // For snprintf()
char buf[128];
(void)snprintf(buf, sizeof(buf), "%s:%u%c:%016llx",
full_name_, static_cast<unsigned>(id_.get()), kindch,