mirror of
https://github.com/aria2/aria2.git
synced 2026-04-02 10:55:00 +00:00
Code cleanup
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user