From: Yuriy Skalko Date: Wed, 21 Oct 2020 07:23:43 +0000 (+0300) Subject: Small refactorings X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=1b508fff0332e514847ba87efbc2e1e0d981daa1;hp=a7018252b75316b7855f04c51be2342dc269f96c;p=features.git Small refactorings --- diff --git a/src/Text.cpp b/src/Text.cpp index 5d761ca134..0bb66f6666 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -1127,7 +1127,7 @@ void Text::charInserted(Cursor & cur) && par.isWordSeparator(cur.pos() - 1)) { // get the word in front of cursor LBUFERR(this == cur.text()); - cur.paragraph().updateWords(); + par.updateWords(); } } diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index e3daaa7704..f9c0ba9b4d 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -540,7 +540,8 @@ void PreviewLoader::Impl::add(string const & latex_snippet) namespace { -std::function EraseSnippet(string const & s) { +std::function EraseSnippet(string const & s) +{ return [&s](InProgressProcess & process) { BitmapFile & snippets = process.second.snippets; BitmapFile::iterator it = snippets.begin(); @@ -550,7 +551,7 @@ std::function EraseSnippet(string const & s) { if (it != end) snippets.erase(it, it+1); }; -}; +} } // namespace diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp index 9714965bdf..4e075f2ed8 100644 --- a/src/support/FileName.cpp +++ b/src/support/FileName.cpp @@ -958,7 +958,7 @@ string DocFileName::outputFileName(string const & path) const string DocFileName::mangledFileName(string const & dir) const { return mangledFileName(dir, true, false); -}; +} string DocFileName::mangledFileName(string const & dir, bool use_counter, bool encrypt_path) const {