summaryrefslogtreecommitdiffstats
path: root/src/direct_bt/GATTNumbers.cpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-05-27 05:38:20 +0200
committerSven Gothel <[email protected]>2020-05-27 05:38:20 +0200
commitfb45588b7a4813dd5e3a2b1a9af55f6799d1de19 (patch)
tree9d56902613195dfde21d0c2f9fbd190488d13842 /src/direct_bt/GATTNumbers.cpp
parente5b36988d1df433dd3f2cc1c9b6da06628e7ee3c (diff)
Fixating certain enums -> 'enum class' (localizing enum scope avoiding duplicates)
Localizing enum scope avoiding duplicates also helps fixating type safety. This is especially important for short enums w/o a type prefix. +++ Fixes: - MgmtEvent::getSpecialized(..): Reading actual uint16_t Opcode instead of just peeking uint8_t! (Duh!) - MgmtEvent* *string* ops: Converting uint16_t Opcode instead of uint8_t to string.
Diffstat (limited to 'src/direct_bt/GATTNumbers.cpp')
-rw-r--r--src/direct_bt/GATTNumbers.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/direct_bt/GATTNumbers.cpp b/src/direct_bt/GATTNumbers.cpp
index 3535a0c9..11287968 100644
--- a/src/direct_bt/GATTNumbers.cpp
+++ b/src/direct_bt/GATTNumbers.cpp
@@ -368,7 +368,8 @@ std::string PeriphalPreferredConnectionParameters::toString() const {
}
std::string GenericAccess::toString() const {
- return "'"+deviceName+"'[appearance "+uint16HexString(appearance)+" ("+AppearanceCatToString(appearance)+"), "+prefConnParam.toString()+"]";
+ return "'"+deviceName+"'[appearance "+uint16HexString(static_cast<uint16_t>(appearance))+" ("+AppearanceCatToString(appearance)+"), "+
+ prefConnParam.toString()+"]";
}
PnP_ID::PnP_ID(const TROOctets &source)