Ap_Terrain: make AP::terrain return a pointer

this is needed for rover and OSD support
This commit is contained in:
Andrew Tridgell 2021-04-07 19:49:25 +10:00
parent 5a941ce02f
commit 5e820b203b
2 changed files with 3 additions and 3 deletions

View File

@ -402,9 +402,9 @@ bool AP_Terrain::allocate(void)
namespace AP {
AP_Terrain &terrain()
AP_Terrain *terrain()
{
return *AP_Terrain::get_singleton();
return AP_Terrain::get_singleton();
}
};

View File

@ -440,7 +440,7 @@ private:
};
namespace AP {
AP_Terrain &terrain();
AP_Terrain *terrain();
};
#endif // AP_TERRAIN_AVAILABLE