From ac9a82de4c0cfa67c0c32e814556aa83434a46c7 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Thu, 10 Apr 2025 11:13:35 -0400 Subject: pkmacros: don't inline + bump version to 0.4.7 --- pkmacros.h | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'pkmacros.h') diff --git a/pkmacros.h b/pkmacros.h index 583f6bc..30144bd 100644 --- a/pkmacros.h +++ b/pkmacros.h @@ -82,78 +82,78 @@ TypeName operator^=(TypeName& a, const TypeName& b); \ TypeName operator~(TypeName& a); #define TypeSafeInt2_B(TypeName, TypeName_T) \ - inline TypeName operator+(const TypeName& a, const TypeName& b) { \ + TypeName operator+(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) + static_cast(b)); \ } \ - inline TypeName operator-(const TypeName& a, const TypeName& b) { \ + TypeName operator-(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) - static_cast(b)); \ } \ - inline TypeName operator*(const TypeName& a, const TypeName& b) { \ + TypeName operator*(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) * static_cast(b)); \ } \ - inline TypeName operator/(const TypeName& a, const TypeName& b) { \ + TypeName operator/(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) / static_cast(b)); \ } \ - inline TypeName operator&(const TypeName& a, const TypeName& b) { \ + TypeName operator&(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) & static_cast(b)); \ } \ - inline TypeName operator|(const TypeName& a, const TypeName& b) { \ + TypeName operator|(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) | static_cast(b)); \ } \ - inline TypeName operator^(const TypeName& a, const TypeName& b) { \ + TypeName operator^(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) ^ static_cast(b)); \ } \ - inline TypeName& operator++(TypeName& a) { \ + TypeName& operator++(TypeName& a) { \ a = a + TypeName{1}; \ return a; \ } \ - inline TypeName& operator--(TypeName& a) { \ + TypeName& operator--(TypeName& a) { \ a = a - TypeName{1}; \ return a; \ }; \ - inline TypeName operator++(TypeName& a, int) { \ + TypeName operator++(TypeName& a, int) { \ a = a + TypeName{1}; \ return a; \ } \ - inline TypeName operator--(TypeName& a, int) { \ + TypeName operator--(TypeName& a, int) { \ a = a - TypeName{1}; \ return a; \ }; \ - inline TypeName operator<<(const TypeName& a, const TypeName& b) { \ + TypeName operator<<(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) << static_cast(b)); \ }; \ - inline TypeName operator>>(const TypeName& a, const TypeName& b) { \ + TypeName operator>>(const TypeName& a, const TypeName& b) { \ return TypeName(static_cast(a) >> static_cast(b)); \ }; \ - inline TypeName operator+=(TypeName& a, const TypeName& b) { \ + TypeName operator+=(TypeName& a, const TypeName& b) { \ a = TypeName{a + b}; \ return a; \ }; \ - inline TypeName operator-=(TypeName& a, const TypeName& b) { \ + TypeName operator-=(TypeName& a, const TypeName& b) { \ a = TypeName{a - b}; \ return a; \ }; \ - inline TypeName operator*=(TypeName& a, const TypeName& b) { \ + TypeName operator*=(TypeName& a, const TypeName& b) { \ a = TypeName{a * b}; \ return a; \ }; \ - inline TypeName operator/=(TypeName& a, const TypeName& b) { \ + TypeName operator/=(TypeName& a, const TypeName& b) { \ a = TypeName{a / b}; \ return a; \ }; \ - inline TypeName operator&=(TypeName& a, const TypeName& b) { \ + TypeName operator&=(TypeName& a, const TypeName& b) { \ a = TypeName{a & b}; \ return a; \ }; \ - inline TypeName operator|=(TypeName& a, const TypeName& b) { \ + TypeName operator|=(TypeName& a, const TypeName& b) { \ a = TypeName{a | b}; \ return a; \ }; \ - inline TypeName operator^=(TypeName& a, const TypeName& b) { \ + TypeName operator^=(TypeName& a, const TypeName& b) { \ a = TypeName{a ^ b}; \ return a; \ }; \ - inline TypeName operator~(TypeName& a) { \ + TypeName operator~(TypeName& a) { \ a = static_cast(~static_cast(a)); \ return a; \ }; -- cgit v1.2.3