diff options
Diffstat (limited to 'dev/LibCompiler/src/CodeGen.cc')
| -rw-r--r-- | dev/LibCompiler/src/CodeGen.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dev/LibCompiler/src/CodeGen.cc b/dev/LibCompiler/src/CodeGen.cc index 31a809b..3f215c5 100644 --- a/dev/LibCompiler/src/CodeGen.cc +++ b/dev/LibCompiler/src/CodeGen.cc @@ -24,10 +24,9 @@ namespace LibCompiler { ///! @brief Compile for specific format (ELF, PEF, ZBIN) Int32 AssemblyFactory::Compile(STLString sourceFile, const Int32& arch) noexcept { - if (sourceFile.length() < 1 || !fMounted) return LIBCOMPILER_UNIMPLEMENTED; + if (sourceFile.length() < 1) return LIBCOMPILER_UNIMPLEMENTED; if (!fMounted) return LIBCOMPILER_UNIMPLEMENTED; - if (arch != fMounted->Arch()) return LIBCOMPILER_INVALID_ARCH; try { @@ -48,7 +47,7 @@ void AssemblyFactory::Mount(AssemblyInterface* mountPtr) noexcept { AssemblyInterface* AssemblyFactory::Unmount() noexcept { auto mount_prev = fMounted; - if (mount_prev) { + if (fMounted) { fMounted = nullptr; } |
