summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 10:30:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-16 13:48:43 +0200
commita7e0a8901e5c16d1ee0637b23217cfd21dfbc89f (patch)
tree3db81e06c02551417b5d7cc12aa5afd9b05b7d00
parentlok: sc: fix for row/col header updating on changing tab (diff)
downloadcore-a7e0a8901e5c16d1ee0637b23217cfd21dfbc89f.tar.gz
core-a7e0a8901e5c16d1ee0637b23217cfd21dfbc89f.zip
loplugin:comparisonwithconstant in avmedia
Change-Id: Iba0a1969648e95f6e0f6a947f067c5b8e4eb3406 Reviewed-on: https://gerrit.libreoffice.org/37667 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--animations/source/animcore/animcore.cxx2
-rw-r--r--avmedia/source/framework/MediaControlBase.cxx2
-rw-r--r--avmedia/source/framework/mediacontrol.cxx6
-rw-r--r--avmedia/source/framework/mediatoolbox.cxx2
-rw-r--r--avmedia/source/framework/modeltools.cxx2
-rw-r--r--avmedia/source/gstreamer/gstplayer.cxx2
-rw-r--r--avmedia/source/gstreamer/gstwindow.cxx4
7 files changed, 10 insertions, 10 deletions
diff --git a/animations/source/animcore/animcore.cxx b/animations/source/animcore/animcore.cxx
index ff30100ce0fe..2d75b522b2f3 100644
--- a/animations/source/animcore/animcore.cxx
+++ b/animations/source/animcore/animcore.cxx
@@ -1942,7 +1942,7 @@ void SAL_CALL AnimationNode::removeChangesListener( const Reference< XChangesLis
// XUnoTunnel
::sal_Int64 SAL_CALL AnimationNode::getSomething( const Sequence< ::sal_Int8 >& rId )
{
- if( rId.getLength() == 16 && 0 == memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) )
+ if( rId.getLength() == 16 && memcmp( getUnoTunnelId().getConstArray(), rId.getConstArray(), 16 ) == 0 )
{
return sal::static_int_cast< sal_Int64 >(reinterpret_cast< sal_IntPtr >(this));
diff --git a/avmedia/source/framework/MediaControlBase.cxx b/avmedia/source/framework/MediaControlBase.cxx
index 6e879244cd07..b828efb990b6 100644
--- a/avmedia/source/framework/MediaControlBase.cxx
+++ b/avmedia/source/framework/MediaControlBase.cxx
@@ -153,7 +153,7 @@ void MediaControlBase::UpdateToolBoxes(MediaItem aMediaItem)
{
mpPlayToolBox->Enable();
mpMuteToolBox->Enable();
- if( MediaState::Play == aMediaItem.getState() )
+ if( aMediaItem.getState() == MediaState::Play )
{
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PLAY );
mpPlayToolBox->CheckItem( AVMEDIA_TOOLBOXITEM_PAUSE, false );
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 85d3f95dd97b..846bd1a52f68 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -106,7 +106,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
mpMediaPath->Show();
maMinSize.Width() += mpMediaPath->GetSizePixel().Width();
- if( MEDIACONTROLSTYLE_MULTILINE == meControlStyle )
+ if( meControlStyle == MEDIACONTROLSTYLE_MULTILINE )
{
maMinSize.Width() = 256;
maMinSize.Height() = ( maMinSize.Height() << 1 ) + AVMEDIA_CONTROLOFFSET;
@@ -121,7 +121,7 @@ MediaControl::MediaControl( vcl::Window* pParent, MediaControlStyle eControlStyl
void MediaControl::InitializeWidgets()
{
- if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle )
+ if( meControlStyle != MEDIACONTROLSTYLE_SINGLELINE )
{
mpPlayToolBox->InsertItem( AVMEDIA_TOOLBOXITEM_OPEN, GetImage(AVMEDIA_TOOLBOXITEM_OPEN), OUString( AVMEDIA_RESID( AVMEDIA_STR_OPEN ) ) );
mpPlayToolBox->SetHelpId( AVMEDIA_TOOLBOXITEM_OPEN, HID_AVMEDIA_TOOLBOXITEM_OPEN );
@@ -190,7 +190,7 @@ void MediaControl::Resize()
const sal_Int32 nMediaPathWidth = mpMediaPath->GetSizePixel().Width();
const sal_Int32 nTimeSliderHeight = mpTimeSlider->GetSizePixel().Height();
- if( MEDIACONTROLSTYLE_SINGLELINE == meControlStyle )
+ if( meControlStyle == MEDIACONTROLSTYLE_SINGLELINE )
{
const sal_Int32 nTimeSliderWidth = GetSizePixel().Width() - ( AVMEDIA_CONTROLOFFSET * 4 ) -
nPlayToolBoxWidth - nMuteToolBoxWidth - nVolumeSliderWidth - nTimeEditWidth - nZoomToolBoxWidth - nMediaPathWidth;
diff --git a/avmedia/source/framework/mediatoolbox.cxx b/avmedia/source/framework/mediatoolbox.cxx
index 08d1f9fa7e43..b40c07fc3c89 100644
--- a/avmedia/source/framework/mediatoolbox.cxx
+++ b/avmedia/source/framework/mediatoolbox.cxx
@@ -103,7 +103,7 @@ void MediaToolBoxControl::StateChanged( sal_uInt16, SfxItemState eState, const S
const MediaItem* pMediaItem = dynamic_cast<const MediaItem*>( pState );
- if( pMediaItem && ( SfxItemState::DEFAULT == eState ) )
+ if( pMediaItem && ( eState == SfxItemState::DEFAULT ) )
pCtrl->setState( *pMediaItem );
}
}
diff --git a/avmedia/source/framework/modeltools.cxx b/avmedia/source/framework/modeltools.cxx
index ab78d0d0b544..03d4647849de 100644
--- a/avmedia/source/framework/modeltools.cxx
+++ b/avmedia/source/framework/modeltools.cxx
@@ -143,7 +143,7 @@ static void lcl_EmbedExternals(const OUString& rSourceURL, const uno::Reference<
OUString sTempFileURL;
const ::osl::FileBase::RC aErr =
::osl::FileBase::createTempFile(nullptr, nullptr, &sTempFileURL);
- if (::osl::FileBase::E_None != aErr)
+ if (aErr != ::osl::FileBase::E_None)
{
SAL_WARN("avmedia.opengl", "Cannot create temp file");
return;
diff --git a/avmedia/source/gstreamer/gstplayer.cxx b/avmedia/source/gstreamer/gstplayer.cxx
index 26b712441692..5b7559bf74d4 100644
--- a/avmedia/source/gstreamer/gstplayer.cxx
+++ b/avmedia/source/gstreamer/gstplayer.cxx
@@ -718,7 +718,7 @@ sal_Bool SAL_CALL Player::isPlaying()
// return whether the pipeline is in PLAYING STATE or not
if( !mbPlayPending && mbInitialized && mpPlaybin )
{
- bRet = GST_STATE_PLAYING == GST_STATE( mpPlaybin );
+ bRet = GST_STATE( mpPlaybin ) == GST_STATE_PLAYING;
}
SAL_INFO( "avmedia.gstreamer", AVVERSION "isPlaying " << bRet );
diff --git a/avmedia/source/gstreamer/gstwindow.cxx b/avmedia/source/gstreamer/gstwindow.cxx
index dace006253fb..30ba0c8764ae 100644
--- a/avmedia/source/gstreamer/gstwindow.cxx
+++ b/avmedia/source/gstreamer/gstwindow.cxx
@@ -55,8 +55,8 @@ sal_Bool SAL_CALL Window::setZoomLevel( media::ZoomLevel eZoomLevel )
{
bool bRet = false;
- if( media::ZoomLevel_NOT_AVAILABLE != meZoomLevel &&
- media::ZoomLevel_NOT_AVAILABLE != eZoomLevel )
+ if( meZoomLevel != media::ZoomLevel_NOT_AVAILABLE &&
+ eZoomLevel != media::ZoomLevel_NOT_AVAILABLE )
{
if( eZoomLevel != meZoomLevel )
{