summaryrefslogtreecommitdiff
path: root/vcl/osx/a11yactionwrapper.mm
diff options
context:
space:
mode:
authorDouglas Mencken <dougmencken@gmail.com>2014-12-01 12:33:56 -0500
committerCaolán McNamara <caolanm@redhat.com>2014-12-02 20:26:01 +0000
commit0d0729ca97e67505a52dcb07d7819f6c444a0031 (patch)
tree27a1967f91ffa45ea2d55c61c618645352030658 /vcl/osx/a11yactionwrapper.mm
parent13658762d2a6a0f33ad23ab6b9295ee93d2280bc (diff)
prefer `if (s)' to `if (nil != s)' for objective-c
in objc, explicit comparison with nil isn't necessary and can produce errors like: comparison between distinct pointer types (...) and 'objc_object*' lacks a cast upd: thanks Norbert Thiebaud for suggestion ``hitChild is a Reference so hitChild = nil was !hitChild.is() right?'' Change-Id: I105be50e5a37bb63e360622e590ec4916fa8a84f Reviewed-on: https://gerrit.libreoffice.org/11891 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/osx/a11yactionwrapper.mm')
-rw-r--r--vcl/osx/a11yactionwrapper.mm4
1 files changed, 2 insertions, 2 deletions
diff --git a/vcl/osx/a11yactionwrapper.mm b/vcl/osx/a11yactionwrapper.mm
index fa0de9608950..5319c47bff3c 100644
--- a/vcl/osx/a11yactionwrapper.mm
+++ b/vcl/osx/a11yactionwrapper.mm
@@ -53,7 +53,7 @@
+(NSArray *)actionNamesForElement:(AquaA11yWrapper *)wrapper {
NSMutableArray * actionNames = [ [ NSMutableArray alloc ] init ];
- if ( [ wrapper accessibleAction ] != nil ) {
+ if ( [ wrapper accessibleAction ] ) {
for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) {
[ actionNames addObject: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ];
}
@@ -62,7 +62,7 @@
}
+(void)doAction:(NSString *)action ofElement:(AquaA11yWrapper *)wrapper {
- if ( [ wrapper accessibleAction ] != nil ) {
+ if ( [ wrapper accessibleAction ] ) {
for ( int cnt = 0; cnt < [ wrapper accessibleAction ] -> getAccessibleActionCount(); cnt++ ) {
if ( [ action isEqualToString: [ AquaA11yActionWrapper nativeActionNameFor: CreateNSString ( [ wrapper accessibleAction ] -> getAccessibleActionDescription ( cnt ) ) ] ] ) {
[ wrapper accessibleAction ] -> doAccessibleAction ( cnt );