From 8c77b5670ec0ee6d550d5adba51b8ae76fe2c162 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 6 Jul 2017 13:10:19 +0200 Subject: use OString::operator== in preference to ::equals Change-Id: Ib291521963a791a9c6175964571e9d9895072acf Reviewed-on: https://gerrit.libreoffice.org/39646 Tested-by: Jenkins Reviewed-by: Noel Grandin --- extensions/source/scanner/sane.cxx | 4 ++-- extensions/source/scanner/sanedlg.cxx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'extensions/source') diff --git a/extensions/source/scanner/sane.cxx b/extensions/source/scanner/sane.cxx index a790375485b9..7ed2a978c42c 100644 --- a/extensions/source/scanner/sane.cxx +++ b/extensions/source/scanner/sane.cxx @@ -296,7 +296,7 @@ bool Sane::Open( const char* name ) OString aDevice( name ); for( int i = 0; i < nDevices; i++ ) { - if( aDevice.equals( ppDevices[i]->name ) ) + if( aDevice == ppDevices[i]->name ) { mnDevice = i; break; @@ -335,7 +335,7 @@ int Sane::GetOptionByName( const char* rName ) OString aOption( rName ); for( i = 0; i < mnOptions; i++ ) { - if( mppOptions[i]->name && aOption.equals( mppOptions[i]->name ) ) + if( mppOptions[i]->name && aOption == mppOptions[i]->name ) return i; } return -1; diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx index 3813f58eea5e..48c9dc6e52f0 100644 --- a/extensions/source/scanner/sanedlg.cxx +++ b/extensions/source/scanner/sanedlg.cxx @@ -1320,7 +1320,7 @@ bool SaneDlg::LoadState() aConfig.SetGroup( "SANE" ); OString aString = aConfig.ReadKey( "SO_LastSaneDevice" ); - for( i = 0; i < Sane::CountDevices() && !aString.equals(OUStringToOString(Sane::GetName(i), osl_getThreadTextEncoding())); i++ ) ; + for( i = 0; i < Sane::CountDevices() && aString != OUStringToOString(Sane::GetName(i), osl_getThreadTextEncoding()); i++ ) ; if( i == Sane::CountDevices() ) return false; -- cgit