diff options
author | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-26 17:45:16 +0200 |
---|---|---|
committer | Benoit Germain <benoit.germain@ubisoft.com> | 2024-06-26 17:45:16 +0200 |
commit | 62a7eab66f8f6af66c94390138815c3171b62810 (patch) | |
tree | 0b93a11f97e186d82a931b40ae092f7438ca3f31 /src/macros_and_utils.h | |
parent | e715be93bf00a452a6c2f1cd86a60b4ef5f30b07 (diff) | |
download | lanes-62a7eab66f8f6af66c94390138815c3171b62810.tar.gz lanes-62a7eab66f8f6af66c94390138815c3171b62810.tar.bz2 lanes-62a7eab66f8f6af66c94390138815c3171b62810.zip |
Change linda:limit()
* read the current limit of a key if no limit is provided
* "unlimited" is to be used to clear the limit
* fix linda:set() not ignoring the limit
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r-- | src/macros_and_utils.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h index 787cf03..1b1ced6 100644 --- a/src/macros_and_utils.h +++ b/src/macros_and_utils.h | |||
@@ -32,6 +32,7 @@ class Unique | |||
32 | T val; | 32 | T val; |
33 | 33 | ||
34 | public: | 34 | public: |
35 | using type = T; | ||
35 | Unique() = default; | 36 | Unique() = default; |
36 | operator T() const { return val; } | 37 | operator T() const { return val; } |
37 | explicit Unique(T b_) | 38 | explicit Unique(T b_) |
@@ -45,6 +46,7 @@ class Unique<T, lambda, std::enable_if_t<!std::is_scalar_v<T>>> | |||
45 | : public T | 46 | : public T |
46 | { | 47 | { |
47 | public: | 48 | public: |
49 | using type = T; | ||
48 | using T::T; | 50 | using T::T; |
49 | explicit Unique(T const& b_) | 51 | explicit Unique(T const& b_) |
50 | : T{ b_ } | 52 | : T{ b_ } |