From 67cd57b5e5dcf4c434e368a805f566daf829853f Mon Sep 17 00:00:00 2001 From: Oxore Date: Mon, 1 May 2023 20:11:36 +0300 Subject: Impl BTST, BCHG, BSET and BCLR --- common.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'common.h') diff --git a/common.h b/common.h index 1a99f75..fbd73de 100644 --- a/common.h +++ b/common.h @@ -13,19 +13,19 @@ constexpr size_t kInstructionSizeStepBytes = 2; constexpr size_t kRomSizeBytes = 4 * 1024 * 1024; constexpr size_t kDisasmMapSizeElements = kRomSizeBytes / kInstructionSizeStepBytes; -constexpr size_t Min(size_t a, size_t b) { return a < b ? a : b; } +static inline constexpr size_t Min(size_t a, size_t b) { return a < b ? a : b; } -constexpr uint16_t GetU16BE(uint8_t *buffer) +static inline constexpr uint16_t GetU16BE(uint8_t *buffer) { return (static_cast(buffer[0]) << 8) | static_cast(buffer[1]); } -constexpr int16_t GetI16BE(uint8_t *buffer) +static inline constexpr int16_t GetI16BE(uint8_t *buffer) { return (static_cast(buffer[0]) << 8) | static_cast(buffer[1]); } -constexpr int32_t GetI32BE(uint8_t *buffer) +static inline constexpr int32_t GetI32BE(uint8_t *buffer) { return (static_cast(buffer[0]) << 24) | (static_cast(buffer[1]) << 16) | -- cgit v1.2.3