mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 04:43:34 +08:00
Removing all dirty 'using namespace std' that were used as C++ library compatibility work-around
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <uavcan/build_config.hpp>
|
||||
#include <uavcan/marshal/type_util.hpp>
|
||||
#include <uavcan/marshal/integer_spec.hpp>
|
||||
#include <uavcan/std.hpp>
|
||||
|
||||
#ifndef UAVCAN_CPP_VERSION
|
||||
# error UAVCAN_CPP_VERSION
|
||||
@@ -729,10 +730,9 @@ public:
|
||||
const SizeType max_size = SizeType(capacity() - size());
|
||||
|
||||
// We have one extra byte for the null terminator, hence +1
|
||||
using namespace std; // For snprintf()
|
||||
const int ret = snprintf(reinterpret_cast<char*>(ptr), SizeType(max_size + 1U), format, value);
|
||||
|
||||
for (int i = 0; i < ::uavcan::min(ret, int(max_size)); i++)
|
||||
for (int i = 0; i < min(ret, int(max_size)); i++)
|
||||
{
|
||||
Base::grow();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user