Commit 31ddd2c76d6b5202e8f40b4532e112c85c5f8269
1 parent
1322df2c
chore: applied a few more SonarCloud suggestions
Showing
2 changed files
with
4 additions
and
4 deletions
src/ClientImpl.h
| ... | ... | @@ -68,14 +68,14 @@ public: |
| 68 | 68 | int connection_backoff_max; ///< Maximum time between backoff attempts in seconds. |
| 69 | 69 | int keep_alive_interval; ///< Interval in seconds between keep-alive messages. |
| 70 | 70 | |
| 71 | - Client::LogLevel log_level = Client::LogLevel::NONE; ///< The log level to use. | |
| 72 | - std::function<void(Client::LogLevel, std::string)> logger = std::move([](Client::LogLevel, std::string) { /* empty */ }); ///< Logger callback. | |
| 71 | + Client::LogLevel log_level = Client::LogLevel::NONE; ///< The log level to use. | |
| 72 | + std::function<void(Client::LogLevel, std::string)> logger = [](Client::LogLevel, std::string) { /* empty */ }; ///< Logger callback. | |
| 73 | 73 | |
| 74 | 74 | std::string last_will_topic = ""; ///< Topic to publish the last will message to. |
| 75 | 75 | std::string last_will_payload = ""; ///< Payload of the last will message. |
| 76 | 76 | bool last_will_retain = false; ///< Whether to retain the last will message. |
| 77 | 77 | |
| 78 | - std::function<void(Error, std::string)> error_callback = std::move([](Error, std::string) { /* empty */ }); ///< Error callback. | |
| 78 | + std::function<void(Error, std::string)> error_callback = [](Error, std::string) { /* empty */ }; ///< Error callback. | |
| 79 | 79 | |
| 80 | 80 | Client::PublishQueueType publish_queue_type = Client::PublishQueueType::DROP; ///< The type of queue to use for the publish queue. |
| 81 | 81 | size_t publish_queue_size = -1; ///< Size of the publish queue. | ... | ... |
src/Connection.cpp
| ... | ... | @@ -177,7 +177,7 @@ void Connection::resolve() |
| 177 | 177 | if (this->log_level >= TrueMQTT::Client::LogLevel::DEBUG) |
| 178 | 178 | { |
| 179 | 179 | LOG_DEBUG(this, "Resolved hostname '" + m_host + "' to:"); |
| 180 | - for (addrinfo *res : m_addresses) | |
| 180 | + for (const addrinfo *res : m_addresses) | |
| 181 | 181 | { |
| 182 | 182 | LOG_DEBUG(this, "- " + addrinfoToString(res)); |
| 183 | 183 | } | ... | ... |