mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 20:43:33 +08:00
Fixed GDTR singleton (http://stackoverflow.com/questions/22985570)
This commit is contained in:
@@ -60,6 +60,12 @@ private:
|
||||
mutable List srvs_;
|
||||
bool frozen_;
|
||||
|
||||
/**
|
||||
* We can't use function local static variable for singleton because of code size issues:
|
||||
* http://stackoverflow.com/questions/22985570
|
||||
*/
|
||||
static GlobalDataTypeRegistry singleton;
|
||||
|
||||
GlobalDataTypeRegistry() : frozen_(false) { }
|
||||
|
||||
List* selectList(DataTypeKind kind) const;
|
||||
|
||||
Reference in New Issue
Block a user