mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
Format using clang-format
This commit is contained in:
parent
2e270eeab4
commit
a7ff8d9e1d
|
@ -12,17 +12,19 @@ std::string FileUtil::GetProjectPath() {
|
|||
#ifdef _WIN32
|
||||
char buffer[FILENAME_MAX];
|
||||
GetModuleFileNameA(NULL, buffer, FILENAME_MAX);
|
||||
std::string::size_type pos =
|
||||
std::string(buffer).rfind("\\jak-project\\"); // Strip file path down to \jak-project\ directory
|
||||
return std::string(buffer).substr(0, pos + 12); // + 12 to include "\jak-project" in the returned filepath
|
||||
std::string::size_type pos = std::string(buffer).rfind(
|
||||
"\\jak-project\\"); // Strip file path down to \jak-project\ directory
|
||||
return std::string(buffer).substr(
|
||||
0, pos + 12); // + 12 to include "\jak-project" in the returned filepath
|
||||
#else // do Linux stuff
|
||||
char buffer[FILENAME_MAX];
|
||||
readlink("/proc/self/exe", buffer,
|
||||
FILENAME_MAX); // /proc/self acts like a "virtual folder" containing information about
|
||||
// the current process
|
||||
std::string::size_type pos =
|
||||
std::string(buffer).find_last_of("/jak-project/"); // Strip file path down to /jak-project/ directory
|
||||
return std::string(buffer).substr(0, pos + 12); // + 12 to include "/jak-project" in the returned filepath
|
||||
std::string::size_type pos = std::string(buffer).find_last_of(
|
||||
"/jak-project/"); // Strip file path down to /jak-project/ directory
|
||||
return std::string(buffer).substr(
|
||||
0, pos + 12); // + 12 to include "/jak-project" in the returned filepath
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue