Small refactorings

This commit is contained in:
Yuriy Skalko 2020-10-21 10:23:43 +03:00
parent a7018252b7
commit 1b508fff03
3 changed files with 5 additions and 4 deletions

View File

@ -1127,7 +1127,7 @@ void Text::charInserted(Cursor & cur)
&& par.isWordSeparator(cur.pos() - 1)) { && par.isWordSeparator(cur.pos() - 1)) {
// get the word in front of cursor // get the word in front of cursor
LBUFERR(this == cur.text()); LBUFERR(this == cur.text());
cur.paragraph().updateWords(); par.updateWords();
} }
} }

View File

@ -540,7 +540,8 @@ void PreviewLoader::Impl::add(string const & latex_snippet)
namespace { namespace {
std::function<void (InProgressProcess &)> EraseSnippet(string const & s) { std::function<void (InProgressProcess &)> EraseSnippet(string const & s)
{
return [&s](InProgressProcess & process) { return [&s](InProgressProcess & process) {
BitmapFile & snippets = process.second.snippets; BitmapFile & snippets = process.second.snippets;
BitmapFile::iterator it = snippets.begin(); BitmapFile::iterator it = snippets.begin();
@ -550,7 +551,7 @@ std::function<void (InProgressProcess &)> EraseSnippet(string const & s) {
if (it != end) if (it != end)
snippets.erase(it, it+1); snippets.erase(it, it+1);
}; };
}; }
} // namespace } // namespace

View File

@ -958,7 +958,7 @@ string DocFileName::outputFileName(string const & path) const
string DocFileName::mangledFileName(string const & dir) const string DocFileName::mangledFileName(string const & dir) const
{ {
return mangledFileName(dir, true, false); return mangledFileName(dir, true, false);
}; }
string DocFileName::mangledFileName(string const & dir, bool use_counter, bool encrypt_path) const string DocFileName::mangledFileName(string const & dir, bool use_counter, bool encrypt_path) const
{ {