aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-20 05:51:29 +0200
committerSven Gothel <[email protected]>2020-10-20 05:51:29 +0200
commit1c54ef46cb137dec49748c5b9c237c6ccd139f6f (patch)
treeafa877818b344bda20f270cdfd7c01ba84657584 /src
parent94205b2e99d114f4238e2b846dce980901a59459 (diff)
Minor int -> uint16_t explicit cast
Turns our there are too many to handle for now. Trust that i.e. dev_id value range does not exceed expected range, but even though - it would just end up in a failed call.
Diffstat (limited to 'src')
-rw-r--r--src/direct_bt/DBTManager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/direct_bt/DBTManager.cpp b/src/direct_bt/DBTManager.cpp
index 54600070..a0654f69 100644
--- a/src/direct_bt/DBTManager.cpp
+++ b/src/direct_bt/DBTManager.cpp
@@ -771,7 +771,7 @@ std::shared_ptr<ConnectionInfo> DBTManager::getConnectionInfo(const int dev_id,
}
std::shared_ptr<NameAndShortName> DBTManager::setLocalName(const int dev_id, const std::string & name, const std::string & short_name) noexcept {
- MgmtSetLocalNameCmd req (dev_id, name, short_name);
+ MgmtSetLocalNameCmd req (static_cast<uint16_t>(dev_id), name, short_name);
std::shared_ptr<MgmtEvent> res = sendWithReply(req);
if( nullptr != res && res->getOpcode() == MgmtEvent::Opcode::CMD_COMPLETE ) {
const MgmtEvtCmdComplete &res1 = *static_cast<const MgmtEvtCmdComplete *>(res.get());
@@ -779,7 +779,7 @@ std::shared_ptr<NameAndShortName> DBTManager::setLocalName(const int dev_id, con
std::shared_ptr<NameAndShortName> result = res1.toNameAndShortName();
// explicit LocalNameChanged event
- MgmtEvtLocalNameChanged * e = new MgmtEvtLocalNameChanged(dev_id, result->getName(), result->getShortName());
+ MgmtEvtLocalNameChanged * e = new MgmtEvtLocalNameChanged(static_cast<uint16_t>(dev_id), result->getName(), result->getShortName());
sendMgmtEvent(std::shared_ptr<MgmtEvent>(e));
return result;
}