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();
|
size_t max = commands.size();
|
||||||
for(size_t i = 0; i < max; ++i) {
|
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();
|
commands.pop_front();
|
||||||
if(com->statusMatch(statusFilter)) {
|
if(com->statusMatch(statusFilter)) {
|
||||||
com->transitStatus();
|
com->transitStatus();
|
||||||
|
|
|
@ -77,10 +77,9 @@ void WebSocketSessionMan::addNotification
|
||||||
params->append(std::move(eventSpec));
|
params->append(std::move(eventSpec));
|
||||||
dict->put("params", std::move(params));
|
dict->put("params", std::move(params));
|
||||||
std::string msg = json::encode(dict.get());
|
std::string msg = json::encode(dict.get());
|
||||||
for(WebSocketSessions::const_iterator i = sessions_.begin(),
|
for(auto& session : sessions_) {
|
||||||
eoi = sessions_.end(); i != eoi; ++i) {
|
session->addTextMessage(msg);
|
||||||
(*i)->addTextMessage(msg);
|
session->getCommand()->updateWriteCheck();
|
||||||
(*i)->getCommand()->updateWriteCheck();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue