mirror of
https://github.com/libretro/bsnes-libretro.git
synced 2024-11-27 02:50:32 +00:00
53843934c0
byuu says: Changelog: - fixed a few TLCS900H CPU and disassembler bugs - hooked up a basic Neo Geo Pocket emulator skeleton and memory map; can run a few instructions from the BIOS - emulated the flash memory used by Neo Geo Pocket games - added sourcery to the higan source archives - fixed ternary expressions in sfc/ppu-fast [hex_usr]
12 lines
567 B
C++
12 lines
567 B
C++
#pragma once
|
|
#warning "these defines break if statements with multiple parameters to templates"
|
|
|
|
#define if1(statement) if(statement)
|
|
#define if2(condition, false) ([&](auto&& value) -> decltype(condition) { \
|
|
return (bool)value ? value : (decltype(condition))false; \
|
|
})(condition)
|
|
#define if3(condition, true, false) ((condition) ? (true) : (decltype(true))(false))
|
|
#define if4(type, condition, true, false) ((condition) ? (type)(true) : (type)(false))
|
|
#define if_(_1, _2, _3, _4, name, ...) name
|
|
#define if(...) if_(__VA_ARGS__, if4, if3, if2, if1)(__VA_ARGS__)
|