[LyX/master] Small refactorings

Yuriy Skalko yuriy.skalko at gmail.com
Sun Oct 25 07:00:27 UTC 2020


commit 1b508fff0332e514847ba87efbc2e1e0d981daa1
Author: Yuriy Skalko <yuriy.skalko at gmail.com>
Date:   Wed Oct 21 10:23:43 2020 +0300

    Small refactorings
---
 src/Text.cpp                   |    2 +-
 src/graphics/PreviewLoader.cpp |    5 +++--
 src/support/FileName.cpp       |    2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 5d761ca..0bb66f6 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 e3daaa7..f9c0ba9 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<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
 
diff --git a/src/support/FileName.cpp b/src/support/FileName.cpp
index 9714965..4e075f2 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
 {


More information about the lyx-cvs mailing list