mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 05:07:43 +00:00
Runtime: Make use of std::make_unique where applicable
Makes use of the C++14 make_unique allocation function to allocate class instances where applicable instead of a reset with a new operator within it. This doesn't touch cases where buffers are allocated, given make_unique would zero-initialize them.
This commit is contained in:
@@ -61,8 +61,8 @@ CGuiSys::CGuiSys(IFactory& resFactory, CSimplePool& resStore, EUsageMode mode)
|
||||
: x0_resFactory(resFactory)
|
||||
, x4_resStore(resStore)
|
||||
, x8_mode(mode)
|
||||
, xc_textExecuteBuf(new CTextExecuteBuffer())
|
||||
, x10_textParser(new CTextParser(resStore)) {
|
||||
, xc_textExecuteBuf(std::make_unique<CTextExecuteBuffer>())
|
||||
, x10_textParser(std::make_unique<CTextParser>(resStore)) {
|
||||
g_TextExecuteBuf = xc_textExecuteBuf.get();
|
||||
g_TextParser = x10_textParser.get();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user