Code cleaning

This commit is contained in:
hsaturn
2021-03-28 21:29:02 +02:00
parent 7d9ab6381d
commit 3bb2dd5a81
3 changed files with 3 additions and 3 deletions

View File

@@ -104,7 +104,7 @@ class IndexedString
const std::string& str() const { return StringIndexer::str(index); }
const StringIndexer::index_t getIndex() const { return index; }
const StringIndexer::index_t& getIndex() const { return index; }
private:
StringIndexer::index_t index;

View File

@@ -126,7 +126,7 @@ void MqttBroker::loop()
// for(auto it=clients.begin(); it!=clients.end(); it++)
// use index because size can change during the loop
for(int i=0; i<clients.size(); i++)
for(size_t i=0; i<clients.size(); i++)
{
auto client = clients[i];
if (client->connected())

View File

@@ -160,7 +160,7 @@ class MqttClient
Serial << "MqttClient (" << clientId.c_str() << ") p=" << (int32_t) parent
<< " c=" << (int32_t)client << (connected() ? " ON " : " OFF");
Serial << ", alive=" << (uint32_t)alive << '/' << ms << ", ka=" << keep_alive;
Serial << " cnx " << (client && client->connected());
Serial << (client && client->connected() ? "" : "dis") << "connected";
message.hexdump("entrant msg");
bool c=false;
Serial << " [";