[Libreoffice-commits] core.git: fpicker/source

Tor Lillqvist tml at collabora.com
Sat Jul 26 01:20:50 PDT 2014


 fpicker/source/aqua/NSString_OOoAdditions.hxx |    1 -
 fpicker/source/aqua/NSString_OOoAdditions.mm  |   17 +----------------
 2 files changed, 1 insertion(+), 17 deletions(-)

New commits:
commit 4f2b97d4c763b711992968f86b4cbf36342681f7
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Jul 26 11:01:27 2014 +0300

    WaE: convenience initializer should not invoke an initializer on 'super'
    
    New warning from Clang 6. So get rid of the initWithOUString
    initializer completely, it is called only from stringWithOUString
    anyway.
    
    Change-Id: I510101bfe1e6ac52f8f5a1d8a061082b3875419f

diff --git a/fpicker/source/aqua/NSString_OOoAdditions.hxx b/fpicker/source/aqua/NSString_OOoAdditions.hxx
index c921393..08bfbd4 100644
--- a/fpicker/source/aqua/NSString_OOoAdditions.hxx
+++ b/fpicker/source/aqua/NSString_OOoAdditions.hxx
@@ -28,7 +28,6 @@
 //for Cocoa types
 @interface NSString (OOoAdditions)
 + (id) stringWithOUString:(const OUString&)ouString;
-- (id) initWithOUString:(const OUString&)ouString;
 - (OUString) OUString;
 @end
 
diff --git a/fpicker/source/aqua/NSString_OOoAdditions.mm b/fpicker/source/aqua/NSString_OOoAdditions.mm
index 66391a9..5b4263a 100644
--- a/fpicker/source/aqua/NSString_OOoAdditions.mm
+++ b/fpicker/source/aqua/NSString_OOoAdditions.mm
@@ -28,27 +28,12 @@
 {
     DBG_PRINT_ENTRY(CLASS_NAME, __func__, "ouString", ouString);
 
-    NSString *string = [[NSString alloc] initWithOUString:ouString];
+    NSString *string = [[NSString alloc] initWithCharacters:ouString.getStr() length:ouString.getLength()];
 
     DBG_PRINT_EXIT(CLASS_NAME, __func__, string);
     return [string autorelease];
 }
 
-- (id) initWithOUString:(const rtl::OUString&)ouString
-{
-    DBG_PRINT_ENTRY(CLASS_NAME, __func__, "ouString", ouString);
-    if ((self = [super init])) {
-        self = [self initWithCharacters:ouString.getStr() length:ouString.getLength()];
-        
-        DBG_PRINT_EXIT(CLASS_NAME, __func__, self);
-        
-        return self;
-    }
-    
-    DBG_PRINT_EXIT(CLASS_NAME, __func__, self);
-    return nil;
-}
-
 - (rtl::OUString) OUString
 {
     unsigned int nFileNameLength = [self length];


More information about the Libreoffice-commits mailing list