Code cleaning
This commit is contained in:
@@ -104,7 +104,7 @@ class IndexedString
|
|||||||
|
|
||||||
const std::string& str() const { return StringIndexer::str(index); }
|
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:
|
private:
|
||||||
StringIndexer::index_t index;
|
StringIndexer::index_t index;
|
||||||
|
|||||||
@@ -126,7 +126,7 @@ void MqttBroker::loop()
|
|||||||
|
|
||||||
// for(auto it=clients.begin(); it!=clients.end(); it++)
|
// for(auto it=clients.begin(); it!=clients.end(); it++)
|
||||||
// use index because size can change during the loop
|
// 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];
|
auto client = clients[i];
|
||||||
if (client->connected())
|
if (client->connected())
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ class MqttClient
|
|||||||
Serial << "MqttClient (" << clientId.c_str() << ") p=" << (int32_t) parent
|
Serial << "MqttClient (" << clientId.c_str() << ") p=" << (int32_t) parent
|
||||||
<< " c=" << (int32_t)client << (connected() ? " ON " : " OFF");
|
<< " c=" << (int32_t)client << (connected() ? " ON " : " OFF");
|
||||||
Serial << ", alive=" << (uint32_t)alive << '/' << ms << ", ka=" << keep_alive;
|
Serial << ", alive=" << (uint32_t)alive << '/' << ms << ", ka=" << keep_alive;
|
||||||
Serial << " cnx " << (client && client->connected());
|
Serial << (client && client->connected() ? "" : "dis") << "connected";
|
||||||
message.hexdump("entrant msg");
|
message.hexdump("entrant msg");
|
||||||
bool c=false;
|
bool c=false;
|
||||||
Serial << " [";
|
Serial << " [";
|
||||||
|
|||||||
Reference in New Issue
Block a user