diff options
author | RSDuck <rsduck@users.noreply.github.com> | 2020-02-04 18:29:52 +0100 |
---|---|---|
committer | RSDuck <rsduck@users.noreply.github.com> | 2020-06-16 11:57:51 +0200 |
commit | 99b34efe2d923c4fd6fbfdb051833d2af6ea2136 (patch) | |
tree | 2f8638d2120dcafad87c0dea4b42127149ed9f67 /src/dolphin/Compat.h | |
parent | baed0ac0d59d3cbbce01389a84da9774f5613b3b (diff) |
move ARM64 JIT backend here
Diffstat (limited to 'src/dolphin/Compat.h')
-rw-r--r-- | src/dolphin/Compat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dolphin/Compat.h b/src/dolphin/Compat.h index f2f52a5..787d505 100644 --- a/src/dolphin/Compat.h +++ b/src/dolphin/Compat.h @@ -61,3 +61,15 @@ { \ printf(fmt "\n", ## __VA_ARGS__); \ } while (false) + +#if __cplusplus < 201703L +// cheat +namespace std +{ +template <typename T> +T clamp(const T& v, const T& lo, const T& hi) +{ + return v < lo ? lo : (v > hi ? hi : v); +} +} +#endif
\ No newline at end of file |