Use strcmp instead of string comparison

Signed-off-by: François Andriot <francois.andriot@free.fr>
(cherry picked from commit a18630c354)
r14.0.x
François Andriot 10 years ago committed by Slávek Banko
parent f9587c3430
commit 5ae4a0b3a6

@ -251,7 +251,7 @@ const bool CSwordBackend::shutdownModules() {
/** Returns true if the given option is enabled. */ /** Returns true if the given option is enabled. */
const bool CSwordBackend::isOptionEnabled( const CSwordModuleInfo::FilterTypes type) { const bool CSwordBackend::isOptionEnabled( const CSwordModuleInfo::FilterTypes type) {
return (getGlobalOption( optionName(type).latin1() ) == "On"); return (strcmp(getGlobalOption( optionName(type).latin1() ), "On") == 0);
} }
/** Sets the given options enabled or disabled depending on the second parameter. */ /** Sets the given options enabled or disabled depending on the second parameter. */

@ -36,7 +36,7 @@ bool CDragDropMgr::BTDrag::canDecode( const TQMimeSource * mime ) {
}; };
bool CDragDropMgr::BTDrag::provides( const char* type ) const { bool CDragDropMgr::BTDrag::provides( const char* type ) const {
return (type == "BibleTime/DND"); //return only true if the type is BibleTime/DND return (strcmp(type, "BibleTime/DND") == 0); //return only true if the type is BibleTime/DND
}; };
const char* CDragDropMgr::BTDrag::format( int i ) const { const char* CDragDropMgr::BTDrag::format( int i ) const {

Loading…
Cancel
Save