Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Commit b8be1f0

Browse files
Romain Quidet1ec5
Romain Quidet
authored andcommittedDec 16, 2015
code review updates: sprite_atlas brackets and nullable removed for reuseIdentifier of annotationImage
1 parent af45d87 commit b8be1f0

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed
 

‎include/mbgl/ios/MGLAnnotationImage.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN
1313
* @param image The image to be displayed for the annotation.
1414
* @param reuseIdentifier The string that identifies that this annotation image is reusable.
1515
* @return The initialized annotation image object or `nil` if there was a problem initializing the object. */
16-
+ (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(nullable NSString *)reuseIdentifier;
16+
+ (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(NSString *)reuseIdentifier;
1717

1818
/** @name Getting and Setting Attributes */
1919

‎platform/ios/MGLAnnotationImage.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ @interface MGLAnnotationImage ()
99

1010
@implementation MGLAnnotationImage
1111

12-
+ (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(nullable NSString *)reuseIdentifier
12+
+ (instancetype)annotationImageWithImage:(UIImage *)image reuseIdentifier:(NSString *)reuseIdentifier
1313
{
1414
return [[self alloc] initWithImage:image reuseIdentifier:reuseIdentifier];
1515
}
1616

17-
- (instancetype)initWithImage:(UIImage *)image reuseIdentifier:(nullable NSString *)reuseIdentifier
17+
- (instancetype)initWithImage:(UIImage *)image reuseIdentifier:(NSString *)reuseIdentifier
1818
{
1919
self = [super init];
2020

‎src/mbgl/sprite/sprite_atlas.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -187,12 +187,9 @@ void SpriteAtlas::updateDirty() {
187187
// The two names match;
188188
Holder& holder = imageIterator->second;
189189
holder.texture = spriteIterator->second;
190-
if (holder.texture != nullptr)
191-
{
190+
if (holder.texture != nullptr) {
192191
copy(holder, imageIterator->first.second);
193-
}
194-
else
195-
{
192+
} else {
196193
images.erase(imageIterator);
197194
}
198195

0 commit comments

Comments
 (0)
This repository has been archived.