mirror of https://github.com/aria2/aria2
Code cleanup
parent
7f049dc2a4
commit
7b04c841d6
|
@ -122,7 +122,7 @@ void executeCommand(std::deque<std::unique_ptr<Command>>& commands,
|
|||
{
|
||||
size_t max = commands.size();
|
||||
for(size_t i = 0; i < max; ++i) {
|
||||
std::unique_ptr<Command> com = std::move(commands.front());
|
||||
auto com = std::move(commands.front());
|
||||
commands.pop_front();
|
||||
if(com->statusMatch(statusFilter)) {
|
||||
com->transitStatus();
|
||||
|
|
|
@ -77,10 +77,9 @@ void WebSocketSessionMan::addNotification
|
|||
params->append(std::move(eventSpec));
|
||||
dict->put("params", std::move(params));
|
||||
std::string msg = json::encode(dict.get());
|
||||
for(WebSocketSessions::const_iterator i = sessions_.begin(),
|
||||
eoi = sessions_.end(); i != eoi; ++i) {
|
||||
(*i)->addTextMessage(msg);
|
||||
(*i)->getCommand()->updateWriteCheck();
|
||||
for(auto& session : sessions_) {
|
||||
session->addTextMessage(msg);
|
||||
session->getCommand()->updateWriteCheck();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue