summaryrefslogtreecommitdiffstats
path: root/src/server/ControlBindings.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2022-08-18 01:18:34 -0400
committerDavid Robillard <d@drobilla.net>2022-08-18 01:18:34 -0400
commit9126ed67acf17bb2009430cb6de25b2ffd783d8e (patch)
tree235eb9e377333520e026f568f020889dd9bdc21d /src/server/ControlBindings.hpp
parent86a914ed7bf5316cad6dcac5f69cc3b300b40a23 (diff)
downloadingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.tar.gz
ingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.tar.bz2
ingen-9126ed67acf17bb2009430cb6de25b2ffd783d8e.zip
Make empty methods and trivial constructors noexcept
Diffstat (limited to 'src/server/ControlBindings.hpp')
-rw-r--r--src/server/ControlBindings.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/ControlBindings.hpp b/src/server/ControlBindings.hpp
index 1c231e22..e71befa1 100644
--- a/src/server/ControlBindings.hpp
+++ b/src/server/ControlBindings.hpp
@@ -64,15 +64,21 @@ public:
};
struct Key {
- Key(Type t=Type::NULL_CONTROL, int16_t n=0) : type(t), num(n) {}
+ Key(Type t = Type::NULL_CONTROL, int16_t n = 0) noexcept
+ : type(t), num(n)
+ {}
+
inline bool operator<(const Key& other) const {
return ((type < other.type) ||
(type == other.type && num < other.num));
}
+
inline bool operator==(const Key& other) const {
return type == other.type && num == other.num;
}
+
inline bool operator!() const { return type == Type::NULL_CONTROL; }
+
Type type;
int16_t num;
};