diff --git a/src/Definitions.h b/src/Definitions.h index d3559db..b0f8b5b 100644 --- a/src/Definitions.h +++ b/src/Definitions.h @@ -167,4 +167,8 @@ DEFINE_TRANSFORMS(ts::PluginTargetMode, uint8_t); DEFINE_TRANSFORMS(ts::ViewReasonId, uint8_t); DEFINE_TRANSFORMS(ts::ChatMessageMode, uint8_t); -#define ts_always_inline inline __attribute__((always_inline)) \ No newline at end of file +#ifdef WIN32 +#define ts_always_inline __forceinline +#else +#define ts_always_inline inline __attribute__((__always_inline__)) +#endif \ No newline at end of file diff --git a/src/PermissionManager.h b/src/PermissionManager.h index b84e7cd..6486774 100644 --- a/src/PermissionManager.h +++ b/src/PermissionManager.h @@ -641,7 +641,7 @@ namespace ts { Permission(const Permission &) = delete; Permission() = delete; - ~Permission(){ } + ~Permission()= default; std::shared_ptr channel = nullptr; ChannelId channelId(); @@ -749,7 +749,9 @@ namespace ts { bool flag_value_update: 1; bool flag_grant_update: 1; - ts_always_inline bool permission_set() { return this->value_set || this->grant_set; } + ts_always_inline bool permission_set() { + return this->value_set || this->grant_set; + } }; static_assert(sizeof(PermissionFlags) == 1); diff --git a/src/misc/spin_lock.h b/src/misc/spin_lock.h index a573a44..4b01bc1 100644 --- a/src/misc/spin_lock.h +++ b/src/misc/spin_lock.h @@ -3,7 +3,7 @@ #include #include -#ifdef WIN2 +#ifdef WIN32 #define always_inline __forceinline #else #define always_inline inline __attribute__((__always_inline__))