This commit is contained in:
WolverinDEV 2019-09-06 21:14:40 +02:00
commit 952c4bf489
3 changed files with 10 additions and 4 deletions

View File

@ -167,4 +167,8 @@ DEFINE_TRANSFORMS(ts::PluginTargetMode, uint8_t);
DEFINE_TRANSFORMS(ts::ViewReasonId, uint8_t); DEFINE_TRANSFORMS(ts::ViewReasonId, uint8_t);
DEFINE_TRANSFORMS(ts::ChatMessageMode, uint8_t); DEFINE_TRANSFORMS(ts::ChatMessageMode, uint8_t);
#define ts_always_inline inline __attribute__((always_inline)) #ifdef WIN32
#define ts_always_inline __forceinline
#else
#define ts_always_inline inline __attribute__((__always_inline__))
#endif

View File

@ -641,7 +641,7 @@ namespace ts {
Permission(const Permission &) = delete; Permission(const Permission &) = delete;
Permission() = delete; Permission() = delete;
~Permission(){ } ~Permission()= default;
std::shared_ptr<BasicChannel> channel = nullptr; std::shared_ptr<BasicChannel> channel = nullptr;
ChannelId channelId(); ChannelId channelId();
@ -749,7 +749,9 @@ namespace ts {
bool flag_value_update: 1; bool flag_value_update: 1;
bool flag_grant_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); static_assert(sizeof(PermissionFlags) == 1);

View File

@ -3,7 +3,7 @@
#include <atomic> #include <atomic>
#include <thread> #include <thread>
#ifdef WIN2 #ifdef WIN32
#define always_inline __forceinline #define always_inline __forceinline
#else #else
#define always_inline inline __attribute__((__always_inline__)) #define always_inline inline __attribute__((__always_inline__))