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:
kobalicek
2025-09-08 09:41:28 +02:00
parent 13eb299dda
commit 32b5f78700
8 changed files with 182 additions and 182 deletions

View File

@@ -398,13 +398,13 @@ bool BenchRegAllocApp::run_arch(Arch arch) {
#ifndef ASMJIT_NO_X86
if (code.arch() == Arch::kX86 || code.arch() == Arch::kX64) {
cc = std::unique_ptr<x86::Compiler>(new x86::Compiler());
cc = std::make_unique<x86::Compiler>();
}
#endif // !ASMJIT_NO_X86
#ifndef ASMJIT_NO_AARCH64
if (code.arch() == Arch::kAArch64) {
cc = std::unique_ptr<a64::Compiler>(new a64::Compiler());
cc = std::make_unique<a64::Compiler>();
}
#endif // !ASMJIT_NO_AARCH64