summaryrefslogtreecommitdiff
path: root/macosx
diff options
context:
space:
mode:
authorJustin R. Miller <incanus@codesorcery.net>2014-02-19 12:44:47 -0800
committerJustin R. Miller <incanus@codesorcery.net>2014-02-19 12:44:47 -0800
commitcfbb8e9f7ddd81f9c0b29a082169a589c6002501 (patch)
tree24c9009d37689f65633d075117d6510788b9dc43 /macosx
parent2989b456a45cb786ea8242b2da9a039395e16999 (diff)
downloadqtlocation-mapboxgl-cfbb8e9f7ddd81f9c0b29a082169a589c6002501.tar.gz
minor objc style stuff
Diffstat (limited to 'macosx')
-rw-r--r--macosx/main.mm7
1 files changed, 3 insertions, 4 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index c9d3045c3a..426e509116 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -217,7 +217,7 @@ public:
};
MapView *mapView;
-NSOperationQueue *queue = NULL;
+NSOperationQueue *queue;
namespace llmr {
namespace platform {
@@ -228,13 +228,12 @@ void restart(void *) {
void request_http(std::string url, std::function<void(Response&)> func, std::function<void()> cb) {
if (!queue) {
- queue = [[NSOperationQueue alloc] init];
+ queue = [NSOperationQueue new];
}
NSMutableURLRequest *urlRequest = [NSMutableURLRequest
requestWithURL:[NSURL
- URLWithString:[NSString
- stringWithUTF8String:url.c_str()]]];
+ URLWithString:@(url.c_str())]];
[NSURLConnection
sendAsynchronousRequest:urlRequest