AP_Terrain: added AP namespace access to terrain

This commit is contained in:
Andrew Tridgell 2020-07-03 13:22:36 +10:00
parent 9466e7e71e
commit fb5a06b8da
2 changed files with 15 additions and 0 deletions

View File

@ -400,4 +400,13 @@ bool AP_Terrain::allocate(void)
return true;
}
namespace AP {
AP_Terrain &terrain()
{
return *AP_Terrain::get_singleton();
}
};
#endif // AP_TERRAIN_AVAILABLE

View File

@ -436,4 +436,10 @@ private:
static AP_Terrain *singleton;
};
namespace AP {
AP_Terrain &terrain();
};
#endif // AP_TERRAIN_AVAILABLE