Code cleanup

pull/119/head
Tatsuhiro Tsujikawa 2013-08-19 23:40:28 +09:00
parent 7f049dc2a4
commit 7b04c841d6
2 changed files with 4 additions and 5 deletions

View File

@ -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();

View File

@ -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();
}
}