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

loplugin:simplifybool

Change-Id: Ia53741b8ebf9d8c673c455bd785e0d6a380271df
üst bfa44945
......@@ -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 )
......
......@@ -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 )
......
......@@ -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 )
......
......@@ -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 )
......
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