mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-23 15:23:34 +08:00
Removing all dirty 'using namespace std' that were used as C++ library compatibility work-around
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user