[Libreoffice-commits] core.git: vcl/source
Jochen Nitschke
j.nitschke+logerrit at ok.de
Mon Jun 20 16:13:53 UTC 2016
vcl/source/app/help.cxx | 1 -
vcl/source/control/button.cxx | 4 ++--
2 files changed, 2 insertions(+), 3 deletions(-)
New commits:
commit 7dddccdcec91d8136d95469f4e607ce0829bde65
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date: Mon Jun 20 15:51:55 2016 +0200
reduce warnings in vcl
pHelpWin is always false,
array sizes can be checked at compile time
Change-Id: I945ede9432b4927b30c31018a1420396176ecb94
Reviewed-on: https://gerrit.libreoffice.org/26518
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx
index 877d1b5..28bc632 100644
--- a/vcl/source/app/help.cxx
+++ b/vcl/source/app/help.cxx
@@ -539,7 +539,6 @@ void ImplShowHelpWindow( vcl::Window* pParent, sal_uInt16 nHelpWinStyle, QuickHe
)
nDelayMode = HELPDELAY_NONE;
- SAL_WARN_IF( pHelpWin, "vcl", "Noch ein HelpWin ?!" );
pHelpWin = VclPtr<HelpTextWindow>::Create( pParent, rHelpText, nHelpWinStyle, nStyle );
pSVData->maHelpData.mpHelpWin = pHelpWin;
pHelpWin->SetStatusText( rStatusText );
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index e427370..0e4dc5b 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -2792,10 +2792,10 @@ static void LoadThemedImageList (const StyleSettings &rStyleSettings,
aColorAry2[5] = rStyleSettings.GetWindowTextColor();
Color aMaskColor(0x00, 0x00, 0xFF );
- SAL_WARN_IF( sizeof(aColorAry1) != sizeof(aColorAry2), "vcl", "aColorAry1 must match aColorAry2" );
+ static_assert( sizeof(aColorAry1) == sizeof(aColorAry2), "aColorAry1 must match aColorAry2" );
// FIXME: do we want the mask for the checkbox ?
pList->InsertFromHorizontalBitmap (rResId, nImages, &aMaskColor,
- aColorAry1, aColorAry2, sizeof(aColorAry1) / sizeof(Color));
+ aColorAry1, aColorAry2, SAL_N_ELEMENTS(aColorAry1));
}
Image RadioButton::GetRadioImage( const AllSettings& rSettings, DrawButtonFlags nFlags )
More information about the Libreoffice-commits
mailing list