Fix warning

This commit is contained in:
Richard Kimberly Heck 2021-02-14 12:30:24 -05:00
parent e5958e3ca8
commit bdd7e26b3e
2 changed files with 4 additions and 4 deletions

View File

@ -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());
}

View File

@ -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)