From 0f2beb6992942feb2e22bf5476cf35b25eabd863 Mon Sep 17 00:00:00 2001 From: "Justin R. Miller" Date: Wed, 19 Feb 2014 12:45:05 -0800 Subject: [PATCH] refs #72: clarity around bg/fg functions --- macosx/main.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macosx/main.mm b/macosx/main.mm index 426e50911..c4f3c87a5 100644 --- a/macosx/main.mm +++ b/macosx/main.mm @@ -226,7 +226,7 @@ void restart(void *) { mapView->dirty = true; } -void request_http(std::string url, std::function func, std::function cb) { +void request_http(std::string url, std::function background_function, std::function foreground_callback) { if (!queue) { queue = [NSOperationQueue new]; } @@ -246,9 +246,9 @@ void request_http(std::string url, std::function func, std::fun res.body = { (const char *)[data bytes], [data length] }; } - func(res); + background_function(res); dispatch_async(dispatch_get_main_queue(), ^(void) { - cb(); + foreground_callback(); }); [[NSNotificationCenter defaultCenter] postNotificationName:MBXNeedsRenderNotification object:nil]; }];