Skip to content
Snippets Groups Projects
Commit fbe8428f authored by makdharma's avatar makdharma Committed by GitHub
Browse files

Merge pull request #7867 from grpc/jcanizales-patch-1

Avoid static initialization of the kIdentity block
parents 336ce427 ea5325c4
No related branches found
No related tags found
No related merge requests found
......@@ -33,10 +33,6 @@
#import "GRXMappingWriter.h"
static id (^kIdentity)(id value) = ^id(id value) {
return value;
};
@interface GRXForwardingWriter () <GRXWriteable>
@end
......@@ -51,7 +47,9 @@ static id (^kIdentity)(id value) = ^id(id value) {
// Designated initializer
- (instancetype)initWithWriter:(GRXWriter *)writer map:(id (^)(id value))map {
if ((self = [super initWithWriter:writer])) {
_map = map ?: kIdentity;
_map = map ?: ^id(id value) {
return value;
};
}
return self;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment