mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 07:23:34 +08:00
Removed sstream from data_type
This commit is contained in:
@@ -2,9 +2,9 @@
|
|||||||
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
|
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sstream>
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iomanip>
|
#include <cstdio>
|
||||||
|
#include <string>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <uavcan/data_type.hpp>
|
#include <uavcan/data_type.hpp>
|
||||||
#include <uavcan/transport/crc.hpp>
|
#include <uavcan/transport/crc.hpp>
|
||||||
@@ -73,10 +73,12 @@ std::string DataTypeDescriptor::toString() const
|
|||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::ostringstream os;
|
using namespace std; // For snprintf()
|
||||||
os << full_name_ << ":" << id_.get() << kindch << ":" << std::hex
|
char buf[80];
|
||||||
<< std::setfill('0') << std::setw(16) << signature_.get();
|
(void)snprintf(buf, sizeof(buf), "%s:%u%c:%016llx",
|
||||||
return os.str();
|
full_name_, static_cast<unsigned>(id_.get()), kindch,
|
||||||
|
static_cast<unsigned long long>(signature_.get()));
|
||||||
|
return std::string(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DataTypeDescriptor::operator==(const DataTypeDescriptor& rhs) const
|
bool DataTypeDescriptor::operator==(const DataTypeDescriptor& rhs) const
|
||||||
|
|||||||
Reference in New Issue
Block a user