C++11 tidying.
[dcpomatic.git] / src / lib / cross_osx.cc
index 6c00afb973bf442b60073f3d94a20e278837ecdf..58ec8e3c46cd6cb6d4b2a228de5086eab0469b2c 100644 (file)
@@ -65,7 +65,7 @@ using std::runtime_error;
 using std::map;
 using std::shared_ptr;
 using boost::optional;
-using boost::function;
+using std::function;
 
 /** @param s Number of seconds to sleep for */
 void
@@ -99,19 +99,7 @@ cpu_info ()
 boost::filesystem::path
 directory_containing_executable ()
 {
-#if BOOST_VERSION >= 106100
        return boost::dll::program_location().parent_path();
-#else
-       uint32_t size = 1024;
-       char buffer[size];
-       if (_NSGetExecutablePath (buffer, &size)) {
-               throw runtime_error ("_NSGetExecutablePath failed");
-       }
-
-       boost::filesystem::path path (buffer);
-       path = boost::filesystem::canonical (path);
-       return path.parent_path ();
-#endif
 }
 
 
@@ -619,3 +607,10 @@ dcpomatic::get_process_id ()
 {
        return dcp::raw_convert<string>(getpid());
 }
+
+
+boost::filesystem::path
+fix_long_path (boost::filesystem::path path)
+{
+       return path;
+}