diff --git a/include/bluez-dbus-cpp/GattApplication1.h b/include/bluez-dbus-cpp/GattApplication1.h index 2209ab8..82aa17a 100644 --- a/include/bluez-dbus-cpp/GattApplication1.h +++ b/include/bluez-dbus-cpp/GattApplication1.h @@ -38,7 +38,7 @@ class GattApplication1 : public: void addService( std::shared_ptr service ) { - for( auto serv : services_ ) + for( const auto & serv : services_ ) { if( serv == service ) throw std::invalid_argument(std::string("GattApplication::addService '") + service->getPath() + std::string("' already registered!")); diff --git a/src/GattCharacteristic1.cpp b/src/GattCharacteristic1.cpp index 097c34f..b4a4b03 100644 --- a/src/GattCharacteristic1.cpp +++ b/src/GattCharacteristic1.cpp @@ -107,12 +107,12 @@ void GattCharacteristic1::addFlag( std::string flag ) // ---- Default Handlers ------------------------------------------------------- -std::vector GattCharacteristic1::ReadValue(const std::map& options) +std::vector GattCharacteristic1::ReadValue(const std::map& /*options*/) { return value_; } -void GattCharacteristic1::WriteValue(const std::vector& value, const std::map& options) +void GattCharacteristic1::WriteValue(const std::vector& value, const std::map& /*options*/) { value_ = value; } @@ -122,22 +122,22 @@ std::map>> GattCharacteristi throw sdbus::Error("org.bluez.Error.NotSupported", "Property 'GattCharacteristic1::DirectedValue' not overloaded!"); } -std::tuple GattCharacteristic1::AcquireWrite(const std::map& options) +std::tuple GattCharacteristic1::AcquireWrite(const std::map& /*options*/) { throw sdbus::Error("org.bluez.Error.NotSupported", "Method 'GattCharacteristic1::AcquireWrite' not overloaded!"); } -std::tuple GattCharacteristic1::AcquireNotify(const std::map& options) +std::tuple GattCharacteristic1::AcquireNotify(const std::map& /*options*/) { throw sdbus::Error("org.bluez.Error.NotSupported", "Method 'GattCharacteristic1::AcquireNotify' not overloaded!"); } -void GattCharacteristic1::StartNotify(const std::map& options) +void GattCharacteristic1::StartNotify(const std::map& /*options*/) { notifyingSessions_ += 1; } -void GattCharacteristic1::StopNotify(const std::map& options) +void GattCharacteristic1::StopNotify(const std::map& /*options*/) { notifyingSessions_ -= 1; } @@ -152,7 +152,7 @@ void GattCharacteristic1::addDescriptor( std::shared_ptr descri { const std::string& descPath = descriptor->getPath(); - for( auto path : includes_ ) + for( const auto & path : includes_ ) { if( path == descPath ) throw std::invalid_argument(std::string("GattCharacteristic1::addDescriptor '") + descPath + std::string("' already registered!")); diff --git a/src/GattService1.cpp b/src/GattService1.cpp index b7a510f..843f5c1 100644 --- a/src/GattService1.cpp +++ b/src/GattService1.cpp @@ -53,7 +53,7 @@ GattService1::~GattService1() void GattService1::addCharacteristic( std::shared_ptr characteristic ) { - for( auto chrc : characteristics_ ) + for( const auto & chrc : characteristics_ ) { if( chrc == characteristic ) throw std::invalid_argument(std::string("GattService1::addCharacteristic '") + characteristic->getPath() + std::string("' already registered!")); @@ -78,7 +78,7 @@ void GattService1::addSubService( std::shared_ptr service ) { const std::string& srvPath = service->getPath(); - for( auto path : includes_ ) + for( const auto & path : includes_ ) { if( path == srvPath ) throw std::invalid_argument(std::string("GattService1::addSubService '") + srvPath + std::string("' already registered!"));