Kaydet (Commit) 537921fd authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:simplifybool

Change-Id: Ia53741b8ebf9d8c673c455bd785e0d6a380271df
üst bfa44945
...@@ -202,7 +202,7 @@ public: ...@@ -202,7 +202,7 @@ public:
void enterPluginCallback() { m_nCalledFromPlugin++; } void enterPluginCallback() { m_nCalledFromPlugin++; }
void leavePluginCallback() { 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* ); DECL_LINK( secondLevelDispose, XPlugin_Impl* );
void addPluginEventListener( PluginEventListener* pListener ) void addPluginEventListener( PluginEventListener* pListener )
......
...@@ -907,7 +907,7 @@ int Sane::GetRange( int n, double*& rpDouble ) ...@@ -907,7 +907,7 @@ int Sane::GetRange( int n, double*& rpDouble )
rpDouble = 0; rpDouble = 0;
int nItems, i; 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 ); dbg_msg( "Sane::GetRange of option %s ", mppOptions[n]->name );
if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE ) if(mppOptions[n]->constraint_type == SANE_CONSTRAINT_RANGE )
......
...@@ -112,9 +112,9 @@ public: ...@@ -112,9 +112,9 @@ public:
~Sane(); ~Sane();
static bool IsSane() static bool IsSane()
{ return pSaneLib ? true : false; } { return pSaneLib != nullptr; }
bool IsOpen() bool IsOpen()
{ return maHandle ? true : false; } { return maHandle != nullptr; }
static int CountDevices() static int CountDevices()
{ return nDevices; } { return nDevices; }
static OUString GetName( int n ) static OUString GetName( int n )
......
...@@ -489,8 +489,8 @@ void SaneDlg::InitFields() ...@@ -489,8 +489,8 @@ void SaneDlg::InitFields()
{ {
OUString aOption=mrSane.GetOptionName( i ); OUString aOption=mrSane.GetOptionName( i );
bool bInsertAdvanced = bool bInsertAdvanced =
mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED && (mrSane.GetOptionCap( i ) & SANE_CAP_ADVANCED) == 0 ||
! mpAdvancedBox->IsChecked() ? false : true; mpAdvancedBox->IsChecked();
if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP ) if( mrSane.GetOptionType( i ) == SANE_TYPE_GROUP )
{ {
if( bInsertAdvanced ) if( bInsertAdvanced )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment