Abbreviations, easy: Difference between revisions

m
C++ code uses std::find_if
m (Reformatted to reduce line count)
m (C++ code uses std::find_if)
Line 414:
 
const command* command_list::find_command(const std::string& word) const {
forauto (constiter command& command= std: :find_if(commands_.begin(), {commands_.end(),
if [&word](const command& cmd) { return cmd.match(word); });
return (iter != commands_.end()) ? &*iter : nullptr;
return &command;
}
return nullptr;
}
 
1,777

edits