mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 08:00:34 +08:00
Fixed GDTR singleton (http://stackoverflow.com/questions/22985570)
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
namespace uavcan
|
||||
{
|
||||
|
||||
GlobalDataTypeRegistry GlobalDataTypeRegistry::singleton;
|
||||
|
||||
GlobalDataTypeRegistry::List* GlobalDataTypeRegistry::selectList(DataTypeKind kind) const
|
||||
{
|
||||
if (kind == DataTypeKindMessage)
|
||||
@@ -115,8 +117,7 @@ GlobalDataTypeRegistry::RegistResult GlobalDataTypeRegistry::registImpl(Entry* d
|
||||
|
||||
GlobalDataTypeRegistry& GlobalDataTypeRegistry::instance()
|
||||
{
|
||||
static GlobalDataTypeRegistry inst;
|
||||
return inst;
|
||||
return singleton;
|
||||
}
|
||||
|
||||
void GlobalDataTypeRegistry::freeze()
|
||||
|
||||
Reference in New Issue
Block a user