[Libreoffice-commits] core.git: vcl/osx

Stephan Bergmann sbergman at redhat.com
Wed Sep 13 11:58:12 UTC 2017


 vcl/osx/printaccessoryview.mm |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 781267bc8de0ac59623666663e22ac368190b98d
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 13 13:57:12 2017 +0200

    Blind macOS -Werror,-Wunreachable-code fix
    
    Change-Id: Ice41b6394bc4fc8e4b1d7b9c5689019361883b59

diff --git a/vcl/osx/printaccessoryview.mm b/vcl/osx/printaccessoryview.mm
index c0f882f4abc5..ad4ea5af9de7 100644
--- a/vcl/osx/printaccessoryview.mm
+++ b/vcl/osx/printaccessoryview.mm
@@ -163,21 +163,17 @@ public:
     , mnLastPageCount( [i_pAccessoryController printerController]->getFilteredPageCount() )
     , mpAccessoryController( i_pAccessoryController )
     {
-        assert( SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 5 && "resources not found" );
+        static_assert( SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) == 5, "resources not found" );
     }
 
     static rtl::OUString getMoreString()
     {
-        return SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 4
-               ? VclResId(SV_PRINT_NATIVE_STRINGS[3])
-               : OUString("More");
+        return VclResId(SV_PRINT_NATIVE_STRINGS[3]);
     }
 
     static rtl::OUString getPrintSelectionString()
     {
-        return SAL_N_ELEMENTS(SV_PRINT_NATIVE_STRINGS) >= 5
-               ? VclResId(SV_PRINT_NATIVE_STRINGS[4])
-               : OUString("Print selection only");
+        return VclResId(SV_PRINT_NATIVE_STRINGS[4]);
     }
 
     int addNameTag( const rtl::OUString& i_rPropertyName )


More information about the Libreoffice-commits mailing list