Skip to content

Commit

Permalink
Fix compilation warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Apr 2, 2024
1 parent 68d79ab commit bb39d35
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/apple/http.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
} // namespace

@interface BenoniHTTPTaskContextWrap : NSObject
@property HTTPTaskContext *context;
@property(nonatomic) HTTPTaskContext *context;
- (BenoniHTTPTaskContextWrap *)initWithContext:(HTTPTaskContext *)context;
- (void)dealloc;
@end
Expand All @@ -44,7 +44,7 @@ - (void)dealloc {

@interface BenoniHTTPSessionDelegate
: NSObject <NSURLSessionDelegate, NSURLSessionTaskDelegate>
@property(readonly)
@property(nonatomic, readonly)
NSMutableDictionary<NSNumber *, BenoniHTTPTaskContextWrap *> *contextMap;
- (BenoniHTTPSessionDelegate *)init;

Expand Down Expand Up @@ -91,13 +91,13 @@ - (void)URLSession:(NSURLSession *)session
if ([httpResponse respondsToSelector:@selector(allHeaderFields)]) {
auto &headers = context->headers;
NSDictionary *allHeaderFields = [httpResponse allHeaderFields];
for (NSString *key in allHeaderFields) {
headers[[key UTF8String]] =
[[allHeaderFields objectForKey:key] UTF8String];
for (NSString *headerField in allHeaderFields) {
headers[[headerField UTF8String]] =
[[allHeaderFields objectForKey:headerField] UTF8String];
}
}

context->status = [httpResponse statusCode];
context->status = static_cast<uint16_t>([httpResponse statusCode]);

context->encoding = NSUTF8StringEncoding;
NSString *encodingName = [httpResponse textEncodingName];
Expand Down

0 comments on commit bb39d35

Please sign in to comment.