void LastOpenedSection::write(ostream & os) const
{
os << '\n' << sec_lastopened << '\n';
- for (size_t i = 0; i < lastopened.size(); ++i)
- os << lastopened[i].active << ", " << lastopened[i].file_name << '\n';
+ for (auto const & last : lastopened)
+ os << last.active << ", " << last.file_name << '\n';
}
// currently, we even crash in some cases (see #9483).
// FIXME: Add session support for multiple views of
// the same buffer (split-view etc.).
- for (size_t i = 0; i < lastopened.size(); ++i) {
- if (lastopened[i].file_name == file)
+ for (auto const & last : lastopened) {
+ if (last.file_name == file)
return;
}
lastopened.push_back(lof);
}
-void LastCommandsSection::add(std::string const & string)
+void LastCommandsSection::add(std::string const & command)
{
- lastcommands.push_back(string);
+ lastcommands.push_back(command);
}