aboutsummaryrefslogtreecommitdiffstats
path: root/api/direct_bt/GATTHandler.hpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-09-24 04:18:49 +0200
committerSven Gothel <[email protected]>2020-09-24 04:18:49 +0200
commitc33b1166da8302100055c9ff6c2081f50cf60fa9 (patch)
tree039bb448f90944cd2ece95f87c8d3b5c6c7e7173 /api/direct_bt/GATTHandler.hpp
parent8b8251317d4c4b587b53f154c832106efa178565 (diff)
Use constexpr where applicable in api/direct_bt
Note that C++17 constexpr implies inline, if a function or static method. In this regard, const expressions can be resolved at compile time and therefor gurantee actual inlining.
Diffstat (limited to 'api/direct_bt/GATTHandler.hpp')
-rw-r--r--api/direct_bt/GATTHandler.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/direct_bt/GATTHandler.hpp b/api/direct_bt/GATTHandler.hpp
index 346d4153..b9c76d86 100644
--- a/api/direct_bt/GATTHandler.hpp
+++ b/api/direct_bt/GATTHandler.hpp
@@ -145,7 +145,7 @@ namespace direct_bt {
/* BT Core Spec v5.2: Vol 3, Part G GATT: 5.2.1 ATT_MTU */
MIN_ATT_MTU = 23
};
- static inline int number(const Defaults d) { return static_cast<int>(d); }
+ static constexpr int number(const Defaults d) { return static_cast<int>(d); }
private:
const GATTEnv & env;