Ranged based for conversion.
This commit is contained in:
parent
9ce7a65869
commit
2980e8fa97
|
@ -28,7 +28,7 @@ ConsoleReader::ConsoleReader(std::vector<Socket*> *sockets_vector)
|
|||
|
||||
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();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue