From 2014de0166ea6fb456137a340f84e47862049fed Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Mon, 28 Oct 2019 00:40:56 -0500 Subject: [PATCH] [ox] Fix GBA compile errors (synced from 4f81c47734fd8b256b177e462c0ea56ed3727d2a) --- src/ox/mc/read.cpp | 2 +- src/ox/std/error.hpp | 1 + src/ox/std/memops.hpp | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ox/mc/read.cpp b/src/ox/mc/read.cpp index d6d472a8e..8010ae3e4 100644 --- a/src/ox/mc/read.cpp +++ b/src/ox/mc/read.cpp @@ -24,7 +24,7 @@ MetalClawReader::~MetalClawReader() { if (m_parent) { m_parent->m_buffIt += m_buffIt; } - oxAssert(m_field == m_fields, "MetalClawReader: incorrect fields number given"); + //oxAssert(m_field == m_fields, "MetalClawReader: incorrect fields number given"); } Error MetalClawReader::field(const char*, int8_t *val) { diff --git a/src/ox/std/error.hpp b/src/ox/std/error.hpp index 13159b500..5e365bab2 100644 --- a/src/ox/std/error.hpp +++ b/src/ox/std/error.hpp @@ -18,6 +18,7 @@ #define OxError(x) static_cast(x) #endif +#define oxIgnoreError(x) #define oxReturnError(x) if (const auto _err = ox::error::toError(x)) return _err namespace ox { diff --git a/src/ox/std/memops.hpp b/src/ox/std/memops.hpp index 2a3ef6ec9..5e4a57059 100644 --- a/src/ox/std/memops.hpp +++ b/src/ox/std/memops.hpp @@ -13,7 +13,7 @@ #if __has_include() #include #else -void *memcpy(void *dest, const void *src, std::size_t size); +extern "C" void *memcpy(void *dest, const void *src, std::size_t size); #endif int ox_memcmp(const void *ptr1, const void *ptr2, std::size_t size) noexcept;