From dfffb9a6d12235f6f8ab4bafcd36f8b884b8f41c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sat, 7 Jan 2012 18:29:04 +0000 Subject: [PATCH] Change to avoid having different types in ?: operator Gcc 4.7 warns rightly about the questionalble practise of having different types in the ?: operator. This patch fixes that. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@40585 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Menus.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/frontends/qt4/Menus.cpp b/src/frontends/qt4/Menus.cpp index 721eff4df8..9ccac3cae1 100644 --- a/src/frontends/qt4/Menus.cpp +++ b/src/frontends/qt4/Menus.cpp @@ -949,9 +949,8 @@ void MenuDefinition::expandDocuments() Buffer * b = first; // We cannot use a for loop as the buffer list cycles. do { - bool const shown = guiApp->currentView() - ? guiApp->currentView()->workArea(*b) : false; - if (!shown) { + if (guiApp->currentView() + && guiApp->currentView()->workArea(*b)) { QString label = toqstr(b->fileName().displayName(20)); if (!b->isClean()) label += "*";