summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-24 12:25:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-24 12:36:21 +0200
commit537921fd65a4e736269eb52986469c05268aae07 (patch)
treea72dc796dee4a3e2e89c192fb3495e8ef9a2af23 /extensions
parentbfa4494560884635a03c4db89588a118f9a2be0b (diff)
loplugin:simplifybool
Change-Id: Ia53741b8ebf9d8c673c455bd785e0d6a380271df
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/plugin/inc/plugin/impl.hxx2
-rw-r--r--extensions/source/scanner/sane.cxx2
-rw-r--r--extensions/source/scanner/sane.hxx4
-rw-r--r--extensions/source/scanner/sanedlg.cxx4
4 files changed, 6 insertions, 6 deletions
diff --git a/extensions/source/plugin/inc/plugin/impl.hxx b/extensions/source/plugin/inc/plugin/impl.hxx
index b79159c8b9bf..80c45a7a6f8c 100644
--- a/extensions/source/plugin/inc/plugin/impl.hxx
+++ b/extensions/source/plugin/inc/plugin/impl.hxx
@@ -202,7 +202,7 @@ public:
void enterPluginCallback() { m_nCalledFromPlugin++; }
void leavePluginCallback() { m_nCalledFromPlugin--; }
- bool isDisposable() { return m_nCalledFromPlugin < 1 ? true : false; }
+ bool isDisposable() { return m_nCalledFromPlugin < 1; }
DECL_LINK( secondLevelDispose, XPlugin_Impl* );
void addPluginEventListener( PluginEventListener* pListener )
diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx
index 29db0ac5fee4..2df5bc75b2ce 100644
--- a/extensions/source/scanner/sane.cxx
+++ b/extensions/source/scanner/sane.cxx
@@ -907,7 +907,7 @@ int Sane::GetRange( int n, double*& rpDouble )
rpDouble = 0;
int nItems, i;
- bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED ? true : false;
+ bool bIsFixed = mppOptions[n]->type == SANE_TYPE_FIXED;
dbg_msg( "Sane::GetRange of option %s ", mppOptions[n]->name );
if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE )
diff --git a/extensions/source/scanner/sane.hxx b/extensions/source/scanner/sane.hxx
index f94402dd7561..338e0df2a5aa 100644
--- a/extensions/source/scanner/sane.hxx
+++ b/extensions/source/scanner/sane.hxx
@@ -112,9 +112,9 @@ public:
~Sane();
static bool IsSane()
- { return pSaneLib ? true : false; }
+ { return pSaneLib != nullptr; }
bool IsOpen()
- { return maHandle ? true : false; }
+ { return maHandle != nullptr; }
static int CountDevices()
{ return nDevices; }
static OUString GetName( int n )
diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx
index 84c00c223ac7..e30c771ac487 100644
--- a/extensions/source/scanner/sanedlg.cxx
+++ b/extensions/source/scanner/sanedlg.cxx
@@ -489,8 +489,8 @@ void SaneDlg::InitFields()
{
OUString aOption=mrSane.GetOptionName( i );
bool bInsertAdvanced =
- mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED &&
- ! mpAdvancedBox->IsChecked() ? false : true;
+ (mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED) == 0 ||
+ mpAdvancedBox->IsChecked();
if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP )
{
if( bInsertAdvanced )