Added signal_token_t to make it easier to store tokens.
This commit is contained in:
parent
bb4d31747a
commit
2668e69ae1
@ -22,6 +22,9 @@ namespace mijin
|
|||||||
// public constants
|
// public constants
|
||||||
//
|
//
|
||||||
|
|
||||||
|
using signal_token_t = std::uint32_t;
|
||||||
|
inline constexpr signal_token_t INVALID_SIGNAL_TOKEN = std::numeric_limits<signal_token_t>::max();
|
||||||
|
|
||||||
//
|
//
|
||||||
// public types
|
// public types
|
||||||
//
|
//
|
||||||
@ -33,7 +36,7 @@ class Signal
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using handler_t = std::function<void(TArgs...)>;
|
using handler_t = std::function<void(TArgs...)>;
|
||||||
using token_t = std::uint32_t;
|
using token_t = signal_token_t;
|
||||||
private:
|
private:
|
||||||
struct RegisteredHandler
|
struct RegisteredHandler
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user