summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-03-31 16:19:33 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-03-31 17:08:00 -0700
commit77b07234762474b45ec902b556bb96e3a1057867 (patch)
treee6da8a03c461249ea17a3475194b1120124f5de4
parent23f2defadd7fbf9511c2a60f4e251bb179524081 (diff)
downloadqtlocation-mapboxgl-77b07234762474b45ec902b556bb96e3a1057867.tar.gz
[ios, osx, linux] Remove unused "applicationRoot" function
-rw-r--r--gyp/platform-ios.gypi1
-rw-r--r--gyp/platform-linux.gypi1
-rw-r--r--gyp/platform-osx.gypi1
-rw-r--r--include/mbgl/platform/platform.hpp3
-rw-r--r--platform/darwin/src/application_root.mm18
-rw-r--r--platform/default/application_root.cpp28
6 files changed, 0 insertions, 52 deletions
diff --git a/gyp/platform-ios.gypi b/gyp/platform-ios.gypi
index c243e32f2b..9ed2c4e8ec 100644
--- a/gyp/platform-ios.gypi
+++ b/gyp/platform-ios.gypi
@@ -26,7 +26,6 @@
'../platform/default/sqlite3.cpp',
'../platform/darwin/src/log_nslog.mm',
'../platform/darwin/src/string_nsstring.mm',
- '../platform/darwin/src/application_root.mm',
'../platform/darwin/src/image.mm',
'../platform/darwin/src/nsthread.mm',
'../platform/darwin/src/reachability.m',
diff --git a/gyp/platform-linux.gypi b/gyp/platform-linux.gypi
index 8865f68e1e..6da1075909 100644
--- a/gyp/platform-linux.gypi
+++ b/gyp/platform-linux.gypi
@@ -14,7 +14,6 @@
'../platform/default/log_stderr.cpp',
'../platform/default/string_stdlib.cpp',
'../platform/default/run_loop.cpp',
- '../platform/default/application_root.cpp',
'../platform/default/thread.cpp',
'../platform/default/image.cpp',
'../platform/default/webp_reader.cpp',
diff --git a/gyp/platform-osx.gypi b/gyp/platform-osx.gypi
index 3659ebb46f..1530f88b82 100644
--- a/gyp/platform-osx.gypi
+++ b/gyp/platform-osx.gypi
@@ -25,7 +25,6 @@
'../platform/default/sqlite3.cpp',
'../platform/darwin/src/log_nslog.mm',
'../platform/darwin/src/string_nsstring.mm',
- '../platform/darwin/src/application_root.mm',
'../platform/darwin/src/image.mm',
'../platform/darwin/src/nsthread.mm',
'../platform/darwin/src/reachability.m',
diff --git a/include/mbgl/platform/platform.hpp b/include/mbgl/platform/platform.hpp
index 087ce56f95..de2585874b 100644
--- a/include/mbgl/platform/platform.hpp
+++ b/include/mbgl/platform/platform.hpp
@@ -15,9 +15,6 @@ std::string uppercase(const std::string &string);
// Lowercase a string, potentially using platform-specific routines.
std::string lowercase(const std::string &string);
-// Returns the path to the root folder of the application.
-const std::string &applicationRoot();
-
// Makes the current thread low priority.
void makeThreadLowPriority();
diff --git a/platform/darwin/src/application_root.mm b/platform/darwin/src/application_root.mm
deleted file mode 100644
index d4702c7ec5..0000000000
--- a/platform/darwin/src/application_root.mm
+++ /dev/null
@@ -1,18 +0,0 @@
-#import <Foundation/Foundation.h>
-
-#include <mbgl/platform/platform.hpp>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the root folder of the application.
-const std::string &applicationRoot() {
- static const std::string root = []() -> std::string {
- NSString *path = [[[NSBundle mainBundle] resourceURL] path];
- return {[path cStringUsingEncoding : NSUTF8StringEncoding],
- [path lengthOfBytesUsingEncoding:NSUTF8StringEncoding]};
- }();
- return root;
-}
-}
-}
diff --git a/platform/default/application_root.cpp b/platform/default/application_root.cpp
deleted file mode 100644
index 6669a049a4..0000000000
--- a/platform/default/application_root.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
-#include <mbgl/platform/platform.hpp>
-
-#include <uv.h>
-#include <libgen.h>
-
-namespace mbgl {
-namespace platform {
-
-// Returns the path to the root folder of the application.
-const std::string &applicationRoot() {
- static const std::string root = []() -> std::string {
- size_t max = 0;
- std::string dir;
- do {
- // Gradually increase the length of the string in case the path was truncated.
- max += 256;
- dir.resize(max);
- uv_exepath(const_cast<char *>(dir.data()), &max);
- } while (max == dir.size());
- dir.resize(max - 1);
- dir = dirname(const_cast<char *>(dir.c_str()));
- return dir;
- }();
- return root;
-}
-
-}
-}