Ranged based for conversion.

This commit is contained in:
Andrius Štikonas 2017-03-13 02:04:56 +00:00
parent 9ce7a65869
commit 2980e8fa97
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ ConsoleReader::ConsoleReader(std::vector<Socket*> *sockets_vector)
void ConsoleReader::run() void ConsoleReader::run()
{ {
std::cout << "Copyright (C) 2015 Andrius Štikonas.\nLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\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 <http://gnu.org/licenses/gpl.html>\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(); connectSignals();
listSockets(); listSockets();
@ -147,7 +147,7 @@ void ConsoleReader::listSockets()
void ConsoleReader::connectSignals() void ConsoleReader::connectSignals()
{ {
for (unsigned i = 0; i < sockets->size(); ++i) { for (const auto &socket : *sockets) {
connect((*sockets)[i], &Socket::stateChanged, this, &ConsoleReader::listSockets); connect(socket, &Socket::stateChanged, this, &ConsoleReader::listSockets);
} }
} }