mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-31 07:01:35 +08:00
Minor renaming in DataTypeDescriptor
This commit is contained in:
@@ -20,23 +20,23 @@ enum DataTypeKind
|
|||||||
|
|
||||||
struct DataTypeHash
|
struct DataTypeHash
|
||||||
{
|
{
|
||||||
enum { BYTES = 16 };
|
enum { NUM_BYTES = 16 };
|
||||||
uint8_t value[BYTES];
|
uint8_t value[NUM_BYTES];
|
||||||
|
|
||||||
DataTypeHash()
|
DataTypeHash()
|
||||||
{
|
{
|
||||||
std::fill(value, value + BYTES, 0);
|
std::fill(value, value + NUM_BYTES, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
DataTypeHash(const uint8_t source[BYTES])
|
DataTypeHash(const uint8_t source[NUM_BYTES])
|
||||||
{
|
{
|
||||||
std::copy(source, source + BYTES, value);
|
std::copy(source, source + NUM_BYTES, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator!=(const DataTypeHash& rhs) const { return !operator==(rhs); }
|
bool operator!=(const DataTypeHash& rhs) const { return !operator==(rhs); }
|
||||||
bool operator==(const DataTypeHash& rhs) const
|
bool operator==(const DataTypeHash& rhs) const
|
||||||
{
|
{
|
||||||
return std::equal(value, value + BYTES, rhs.value);
|
return std::equal(value, value + NUM_BYTES, rhs.value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user