diff --git a/consolereader.cpp b/consolereader.cpp index 0f19ee8..b6b101a 100644 --- a/consolereader.cpp +++ b/consolereader.cpp @@ -28,7 +28,7 @@ ConsoleReader::ConsoleReader(std::vector *sockets_vector) void ConsoleReader::run() { - std::cout << "Copyright (C) 2015 Andrius Štikonas.\nLicense GPLv3+: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law." << std::endl; + std::cout << "Copyright (C) 2015 Andrius Štikonas.\nLicense: GNU GPL version 3 or later \nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law." << std::endl; connectSignals(); listSockets(); @@ -147,7 +147,7 @@ void ConsoleReader::listSockets() void ConsoleReader::connectSignals() { - for (unsigned i = 0; i < sockets->size(); ++i) { - connect((*sockets)[i], &Socket::stateChanged, this, &ConsoleReader::listSockets); + for (const auto &socket : *sockets) { + connect(socket, &Socket::stateChanged, this, &ConsoleReader::listSockets); } }