]> git.lyx.org Git - features.git/commitdiff
Small refactorings
authorYuriy Skalko <yuriy.skalko@gmail.com>
Wed, 21 Oct 2020 07:23:43 +0000 (10:23 +0300)
committerYuriy Skalko <yuriy.skalko@gmail.com>
Sun, 25 Oct 2020 07:28:41 +0000 (09:28 +0200)
src/Text.cpp
src/graphics/PreviewLoader.cpp
src/support/FileName.cpp

index 5d761ca134b6d25b23e35f8fbb18a65409db25d4..0bb66f6666e46ee6bf69fe89390cc9cb2df3ac15 100644 (file)
@@ -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();
        }
 }
 
index e3daaa770415d24a563f650cc3fd2819b8b3ec24..f9c0ba9b4d441330af8c294132f7a6d9d597d5ec 100644 (file)
@@ -540,7 +540,8 @@ void PreviewLoader::Impl::add(string const & latex_snippet)
 
 namespace {
 
-std::function<void (InProgressProcess &)> EraseSnippet(string const & s) {
+std::function<void (InProgressProcess &)> EraseSnippet(string const & s)
+{
        return [&s](InProgressProcess & process) {
                BitmapFile & snippets = process.second.snippets;
                BitmapFile::iterator it  = snippets.begin();
@@ -550,7 +551,7 @@ std::function<void (InProgressProcess &)> EraseSnippet(string const & s) {
                if (it != end)
                        snippets.erase(it, it+1);
        };
-};
+}
 
 } // namespace
 
index 9714965bdf1859a5265c3a4e99d46faf050838d8..4e075f2ed81fc064ddf034ae38b92513c11b1761 100644 (file)
@@ -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
 {