mirror of
https://github.com/asmjit/asmjit.git
synced 2025-12-18 21:14:35 +03:00
Minor C++17 modernization
* Inspired by the one of the pull requests (#483) * Use std::make_unique to make a unique pointer (tests only) * Use override instead of virtual to override a virtual member function
This commit is contained in:
@@ -246,12 +246,12 @@ int TestApp::run() {
|
||||
|
||||
#ifndef ASMJIT_NO_X86
|
||||
if (code.arch() == Arch::kX86 || code.arch() == Arch::kX64)
|
||||
cc = std::unique_ptr<x86::Compiler>(new x86::Compiler(&code));
|
||||
cc = std::make_unique<x86::Compiler>(&code);
|
||||
#endif // !ASMJIT_NO_X86
|
||||
|
||||
#ifndef ASMJIT_NO_AARCH64
|
||||
if (code.arch() == Arch::kAArch64)
|
||||
cc = std::unique_ptr<a64::Compiler>(new a64::Compiler(&code));
|
||||
cc = std::make_unique<a64::Compiler>(&code);
|
||||
#endif // !ASMJIT_NO_AARCH64
|
||||
|
||||
if (!cc)
|
||||
|
||||
Reference in New Issue
Block a user