Use placement-new to initialize static variables in CLI. (#341)

This commit is contained in:
Jonathan Hui
2016-08-05 11:56:01 -07:00
committed by GitHub
parent b665529dac
commit 90eac68ff5
3 changed files with 52 additions and 11 deletions
+1
View File
@@ -58,6 +58,7 @@ static otDEFINE_ALIGNED_VAR(sCliUartRaw, sizeof(Uart), uint64_t);
extern "C" void otCliUartInit(void)
{
sServer = new(&sCliUartRaw) Uart;
Interpreter::Init();
}
Uart::Uart(void)