summaryrefslogtreecommitdiff
path: root/common.h
diff options
context:
space:
mode:
authorOxore <oxore@protonmail.com>2023-04-27 23:28:25 +0300
committerOxore <oxore@protonmail.com>2023-04-27 23:28:25 +0300
commit9de14dc1635829fa162731d0ef179c3b2b7ae5be (patch)
treeaf2312b88952565588c2ce12e374461fa7148d29 /common.h
parente57b4a0a762c7951de3d9c9cc1c5eff886296835 (diff)
Fix bugs found on random tests
Diffstat (limited to 'common.h')
-rw-r--r--common.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/common.h b/common.h
index 34ba934..1a99f75 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;
-static inline size_t Min(size_t a, size_t b) { return a < b ? a : b; }
+constexpr size_t Min(size_t a, size_t b) { return a < b ? a : b; }
-static inline uint16_t GetU16BE(uint8_t *buffer)
+constexpr uint16_t GetU16BE(uint8_t *buffer)
{
return (static_cast<uint16_t>(buffer[0]) << 8) | static_cast<uint16_t>(buffer[1]);
}
-static inline int16_t GetI16BE(uint8_t *buffer)
+constexpr int16_t GetI16BE(uint8_t *buffer)
{
return (static_cast<uint16_t>(buffer[0]) << 8) | static_cast<uint16_t>(buffer[1]);
}
-static inline int32_t GetI32BE(uint8_t *buffer)
+constexpr int32_t GetI32BE(uint8_t *buffer)
{
return (static_cast<uint32_t>(buffer[0]) << 24) |
(static_cast<uint32_t>(buffer[1]) << 16) |