Made requested revisions for naming and spacing
authorChris Pickett <github@parnic.com>
Wed, 6 Jan 2016 18:20:38 +0000 (12:20 -0600)
committerChris Pickett <github@parnic.com>
Wed, 6 Jan 2016 18:20:38 +0000 (12:20 -0600)
include/flatbuffers/util.h

index d2d8cae..2c3be68 100644 (file)
@@ -219,19 +219,19 @@ inline void EnsureDirExists(const std::string &filepath) {
 // Obtains the absolute path from any other path.
 // Returns the input path if the absolute path couldn't be resolved.
 inline std::string AbsolutePath(const std::string &filepath) {
-#ifdef NO_ABSOLUTE_PATH_RESOLUTION
-       return filepath;
-#else
-  #ifdef _WIN32
-    char abs_path[MAX_PATH];
-    return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
+  #ifdef FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION
+    return filepath;
   #else
-    char abs_path[PATH_MAX];
-    return realpath(filepath.c_str(), abs_path)
-  #endif
-    ? abs_path
-    : filepath;
-#endif // NO_ABSOLUTE_PATH_RESOLUTION
+    #ifdef _WIN32
+      char abs_path[MAX_PATH];
+      return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
+    #else
+      char abs_path[PATH_MAX];
+      return realpath(filepath.c_str(), abs_path)
+    #endif
+      ? abs_path
+      : filepath;
+  #endif // NO_ABSOLUTE_PATH_RESOLUTION
 }
 
 // To and from UTF-8 unicode conversion functions