mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 17:33:33 +08:00
name --> full_name
This commit is contained in:
@@ -41,7 +41,7 @@ TransferCRC DataTypeSignature::toTransferCRC() const
|
||||
*/
|
||||
bool DataTypeDescriptor::match(DataTypeKind kind, const char* name) const
|
||||
{
|
||||
return (kind_ == kind) && !std::strcmp(name_, name);
|
||||
return (kind_ == kind) && !std::strcmp(full_name_, name);
|
||||
}
|
||||
|
||||
bool DataTypeDescriptor::match(DataTypeKind kind, uint16_t id) const
|
||||
@@ -60,7 +60,7 @@ std::string DataTypeDescriptor::toString() const
|
||||
}
|
||||
|
||||
std::ostringstream os;
|
||||
os << name_ << ":" << id_ << kindch << ":" << std::hex << std::setfill('0') << std::setw(16) << signature_.get();
|
||||
os << full_name_ << ":" << id_ << kindch << ":" << std::hex << std::setfill('0') << std::setw(16) << signature_.get();
|
||||
return os.str();
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ bool DataTypeDescriptor::operator==(const DataTypeDescriptor& rhs) const
|
||||
(kind_ == rhs.kind_) &&
|
||||
(id_ == rhs.id_) &&
|
||||
(signature_ == rhs.signature_) &&
|
||||
!std::strcmp(name_, rhs.name_);
|
||||
!std::strcmp(full_name_, rhs.full_name_);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::remove(Entry* dtd)
|
||||
while (p)
|
||||
{
|
||||
Entry* const next = p->getNextListNode();
|
||||
if (p->descriptor.match(dtd->descriptor.getKind(), dtd->descriptor.getName()))
|
||||
if (p->descriptor.match(dtd->descriptor.getKind(), dtd->descriptor.getFullName()))
|
||||
list->remove(p);
|
||||
p = next;
|
||||
}
|
||||
@@ -79,7 +79,7 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::registImpl(Entry* d
|
||||
{
|
||||
if (p->descriptor.getID() == dtd->descriptor.getID()) // ID collision
|
||||
return RegistResultCollision;
|
||||
if (p->descriptor.match(dtd->descriptor.getName())) // Name collision
|
||||
if (p->descriptor.match(dtd->descriptor.getFullName())) // Name collision
|
||||
return RegistResultCollision;
|
||||
p = p->getNextListNode();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user