Bgerstle has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/202805

Change subject: fix for some compiler warnings
......................................................................

fix for some compiler warnings

- wasn't properly implementing ImageInfoController delegate method
  (missed during refactor, thanks Xcode!)
- WMFRangeUtils should've just been a header w/ static inline methods
- Removing unused method declaration and C function in OldDataSchema

Change-Id: I4fa8d18d0610f9dcc0933542a39a472c78ba049a
---
M OldDataSchema/Data/ArticleDataContextSingleton.h
M OldDataSchema/Data/ArticleDataContextSingleton.m
M Wikipedia.xcodeproj/project.pbxproj
M Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
M Wikipedia/mw-utils/WMFRangeUtils.h
D Wikipedia/mw-utils/WMFRangeUtils.m
6 files changed, 14 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/05/202805/1

diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.h 
b/OldDataSchema/Data/ArticleDataContextSingleton.h
index 1f188ce..d533b7e 100644
--- a/OldDataSchema/Data/ArticleDataContextSingleton.h
+++ b/OldDataSchema/Data/ArticleDataContextSingleton.h
@@ -13,6 +13,4 @@
 
 - (void)saveContextAndPropagateChangesToStore:(NSManagedObjectContext*)context 
completionBlock:(void(^)(NSError* error))completionBlock;
 
-- (id)createArticleDataModel:(Class)modelClass;
-
 @end
diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.m 
b/OldDataSchema/Data/ArticleDataContextSingleton.m
index 812f948..e6182dc 100644
--- a/OldDataSchema/Data/ArticleDataContextSingleton.m
+++ b/OldDataSchema/Data/ArticleDataContextSingleton.m
@@ -4,10 +4,6 @@
 #import "ArticleDataContextSingleton.h"
 #import "NSManagedObjectModel+OldDataSchema.h"
 
-id WMFCreateArticleDataModel(Class modelClass) {
-    return [[ArticleDataContextSingleton sharedInstance] 
createArticleDataModel:modelClass];
-}
-
 @interface ArticleDataContextSingleton (){
     
 }
diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index fdf2f8c..e21aa5b 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -302,7 +302,6 @@
                BCC185D81A9E5628005378F8 /* UILabel+WMFStyling.m in Sources */ 
= {isa = PBXBuildFile; fileRef = BCC185D71A9E5628005378F8 /* 
UILabel+WMFStyling.m */; };
                BCC185E01A9EC836005378F8 /* UIButton+FrameUtils.m in Sources */ 
= {isa = PBXBuildFile; fileRef = BCC185DF1A9EC836005378F8 /* 
UIButton+FrameUtils.m */; };
                BCC185E81A9FA498005378F8 /* 
UICollectionViewFlowLayout+AttributeUtils.m in Sources */ = {isa = 
PBXBuildFile; fileRef = BCC185E71A9FA498005378F8 /* 
UICollectionViewFlowLayout+AttributeUtils.m */; };
-               BCDB75BF1AB0DFC40005593F /* WMFRangeUtils.m in Sources */ = 
{isa = PBXBuildFile; fileRef = BCDB75BE1AB0DFC40005593F /* WMFRangeUtils.m */; 
};
                BCDB75C41AB0E8300005593F /* WMFSubstringUtilsTests.m in Sources 
*/ = {isa = PBXBuildFile; fileRef = BCDB75C31AB0E8300005593F /* 
WMFSubstringUtilsTests.m */; };
                BCE912BA1ACC5E6900B74B42 /* NSIndexSet+BKReduce.m in Sources */ 
= {isa = PBXBuildFile; fileRef = BCE912B91ACC5E6900B74B42 /* 
NSIndexSet+BKReduce.m */; };
                BCE912BD1ACC629B00B74B42 /* NSIndexSet+BKReduceTests.m in 
Sources */ = {isa = PBXBuildFile; fileRef = BCE912BC1ACC629B00B74B42 /* 
NSIndexSet+BKReduceTests.m */; };
@@ -922,7 +921,6 @@
                BCC185E71A9FA498005378F8 /* 
UICollectionViewFlowLayout+AttributeUtils.m */ = {isa = PBXFileReference; 
fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = 
"UICollectionViewFlowLayout+AttributeUtils.m"; sourceTree = "<group>"; };
                BCDB75BC1AB0D3DE0005593F /* WMFImageInfoController_Private.h */ 
= {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.h; name = WMFImageInfoController_Private.h; path = "Image 
Gallery/WMFImageInfoController_Private.h"; sourceTree = "<group>"; };
                BCDB75BD1AB0DFC40005593F /* WMFRangeUtils.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
WMFRangeUtils.h; sourceTree = "<group>"; };
-               BCDB75BE1AB0DFC40005593F /* WMFRangeUtils.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= WMFRangeUtils.m; sourceTree = "<group>"; };
                BCDB75C31AB0E8300005593F /* WMFSubstringUtilsTests.m */ = {isa 
= PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; 
path = WMFSubstringUtilsTests.m; sourceTree = "<group>"; };
                BCE912B81ACC5E6900B74B42 /* NSIndexSet+BKReduce.h */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = 
"NSIndexSet+BKReduce.h"; sourceTree = "<group>"; };
                BCE912B91ACC5E6900B74B42 /* NSIndexSet+BKReduce.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path 
= "NSIndexSet+BKReduce.m"; sourceTree = "<group>"; };
@@ -2348,7 +2346,6 @@
                                BCB848761AAAABF80077EC24 /* 
WMFRoundingUtilities.h */,
                                BCB848771AAAABF80077EC24 /* 
WMFRoundingUtilities.c */,
                                BCDB75BD1AB0DFC40005593F /* WMFRangeUtils.h */,
-                               BCDB75BE1AB0DFC40005593F /* WMFRangeUtils.m */,
                        );
                        path = "mw-utils";
                        sourceTree = "<group>";
@@ -3001,7 +2998,6 @@
                                BCB669A91A83F6C400C7B1FE /* MWKSection.m in 
Sources */,
                                BCB669B61A83F6C400C7B1FE /* MWKImageList.m in 
Sources */,
                                BCB848831AAE0C5C0077EC24 /* 
WMFImageGalleryCollectionViewCell.m in Sources */,
-                               BCDB75BF1AB0DFC40005593F /* WMFRangeUtils.m in 
Sources */,
                                04B0EA4A190B2348007458AF /* 
PreviewLicenseView.m in Sources */,
                                0462A6D11A1FE016009412D4 /* 
SearchResultAttributedString.m in Sources */,
                                0487047F19F8262600B7D307 /* AccountCreator.m in 
Sources */,
diff --git a/Wikipedia/View Controllers/Image 
Gallery/WMFImageGalleryViewController.m b/Wikipedia/View Controllers/Image 
Gallery/WMFImageGalleryViewController.m
index 7e85924..7e9c4dd 100644
--- a/Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
+++ b/Wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
@@ -592,9 +592,9 @@
     }];
 }
 
-- (void)imageInfoController:(WMFImageInfoController*)controller
-              didFetchBatch:(__unused NSRange)range
-                      error:(NSError*)error {
+- (void)imageInfoController:(WMFImageInfoController *)controller
+         failedToFetchBatch:(NSRange)range
+                      error:(NSError *)error {
     // TODO: only show errors on the cells for which we failed to get image 
info
     [self showAlert:error.localizedDescription type:ALERT_TYPE_TOP 
duration:-1];
 }
diff --git a/Wikipedia/mw-utils/WMFRangeUtils.h 
b/Wikipedia/mw-utils/WMFRangeUtils.h
index 32f6744..92e9193 100644
--- a/Wikipedia/mw-utils/WMFRangeUtils.h
+++ b/Wikipedia/mw-utils/WMFRangeUtils.h
@@ -8,8 +8,16 @@
 
 #import <Foundation/Foundation.h>
 
-extern inline BOOL WMFRangeIsNotFoundOrEmpty(NSRange const range);
+static inline BOOL WMFRangeIsNotFoundOrEmpty(NSRange const range) {
+    return range.location == NSNotFound || range.length == 0;
+}
 
-extern inline NSRange WMFRangeMakeNotFound();
+static inline NSRange WMFRangeMakeNotFound() {
+    return NSMakeRange(NSNotFound, 0);
+}
 
-extern inline NSUInteger WMFRangeGetMaxIndex(NSRange const range);
\ No newline at end of file
+static inline NSUInteger WMFRangeGetMaxIndex(NSRange const range) {
+    return range.location != NSNotFound ?
+           range.location + range.length
+           : NSNotFound;
+}
\ No newline at end of file
diff --git a/Wikipedia/mw-utils/WMFRangeUtils.m 
b/Wikipedia/mw-utils/WMFRangeUtils.m
deleted file mode 100644
index cd92a21..0000000
--- a/Wikipedia/mw-utils/WMFRangeUtils.m
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-//  WMFRangeUtils.m
-//  Wikipedia
-//
-//  Created by Brian Gerstle on 3/11/15.
-//  Copyright (c) 2015 Wikimedia Foundation. All rights reserved.
-//
-
-#import "WMFRangeUtils.h"
-
-inline BOOL WMFRangeIsNotFoundOrEmpty(NSRange const range) {
-    return range.location == NSNotFound || range.length == 0;
-}
-
-inline NSRange WMFRangeMakeNotFound() {
-    return NSMakeRange(NSNotFound, 0);
-}
-
-inline NSUInteger WMFRangeGetMaxIndex(NSRange const range) {
-    return range.location != NSNotFound ?
-           range.location + range.length
-           : NSNotFound;
-}
\ No newline at end of file

-- 
To view, visit https://gerrit.wikimedia.org/r/202805
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4fa8d18d0610f9dcc0933542a39a472c78ba049a
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Bgerstle <bgers...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to