mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 01:32:18 +00:00
Made requested revisions for naming and spacing
This commit is contained in:
@@ -219,19 +219,19 @@ inline void EnsureDirExists(const std::string &filepath) {
|
|||||||
// Obtains the absolute path from any other path.
|
// Obtains the absolute path from any other path.
|
||||||
// Returns the input path if the absolute path couldn't be resolved.
|
// Returns the input path if the absolute path couldn't be resolved.
|
||||||
inline std::string AbsolutePath(const std::string &filepath) {
|
inline std::string AbsolutePath(const std::string &filepath) {
|
||||||
#ifdef NO_ABSOLUTE_PATH_RESOLUTION
|
#ifdef FLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION
|
||||||
return filepath;
|
return filepath;
|
||||||
#else
|
|
||||||
#ifdef _WIN32
|
|
||||||
char abs_path[MAX_PATH];
|
|
||||||
return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
|
|
||||||
#else
|
#else
|
||||||
char abs_path[PATH_MAX];
|
#ifdef _WIN32
|
||||||
return realpath(filepath.c_str(), abs_path)
|
char abs_path[MAX_PATH];
|
||||||
#endif
|
return GetFullPathNameA(filepath.c_str(), MAX_PATH, abs_path, nullptr)
|
||||||
? abs_path
|
#else
|
||||||
: filepath;
|
char abs_path[PATH_MAX];
|
||||||
#endif // NO_ABSOLUTE_PATH_RESOLUTION
|
return realpath(filepath.c_str(), abs_path)
|
||||||
|
#endif
|
||||||
|
? abs_path
|
||||||
|
: filepath;
|
||||||
|
#endif // NO_ABSOLUTE_PATH_RESOLUTION
|
||||||
}
|
}
|
||||||
|
|
||||||
// To and from UTF-8 unicode conversion functions
|
// To and from UTF-8 unicode conversion functions
|
||||||
|
|||||||
Reference in New Issue
Block a user