[LyX/master] Fix warning

Richard Kimberly Heck rikiheck at lyx.org
Mon Feb 15 14:51:58 UTC 2021


commit bdd7e26b3e47a41a1f8d8de7af279c18acbd55ca
Author: Richard Kimberly Heck <rikiheck at lyx.org>
Date:   Sun Feb 14 12:30:24 2021 -0500

    Fix warning
---
 src/frontends/qt/GuiSearch.cpp     |    2 +-
 src/frontends/qt/GuiViewSource.cpp |    6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/frontends/qt/GuiSearch.cpp b/src/frontends/qt/GuiSearch.cpp
index ee83692..519c1c2 100644
--- a/src/frontends/qt/GuiSearch.cpp
+++ b/src/frontends/qt/GuiSearch.cpp
@@ -292,7 +292,7 @@ GuiSearch::GuiSearch(GuiView & parent, Qt::DockWidgetArea area, Qt::WindowFlags
 
 void GuiSearch::onBufferViewChanged()
 {
-	widget_->setEnabled((bool)bufferview());
+	widget_->setEnabled(static_cast<bool>(bufferview()));
 	widget_->setBufferView(bufferview());
 }
 
diff --git a/src/frontends/qt/GuiViewSource.cpp b/src/frontends/qt/GuiViewSource.cpp
index f1938c5..310d24e 100644
--- a/src/frontends/qt/GuiViewSource.cpp
+++ b/src/frontends/qt/GuiViewSource.cpp
@@ -420,14 +420,14 @@ GuiViewSource::GuiViewSource(GuiView & parent,
 void GuiViewSource::onBufferViewChanged()
 {
 	widget_->setText();
-	widget_->setEnabled((bool)bufferview());
+	widget_->setEnabled(static_cast<bool>(bufferview()));
 }
 
 
 void GuiViewSource::updateView()
 {
 	if (widget_->autoUpdateCB->isChecked()) {
-		widget_->setEnabled((bool)bufferview());
+		widget_->setEnabled(static_cast<bool>(bufferview()));
 		scheduleUpdate();
 	}
 	widget_->masterPerspectiveCB->setEnabled(buffer().parent());
@@ -437,7 +437,7 @@ void GuiViewSource::updateView()
 
 void GuiViewSource::enableView(bool enable)
 {
-	widget_->setEnabled((bool)bufferview());
+	widget_->setEnabled(static_cast<bool>(bufferview()));
 	if (bufferview())
 		widget_->updateDefaultFormat(*bufferview());
 	if (!enable)


More information about the lyx-cvs mailing list