mirror of
https://github.com/open-goal/jak-project
synced 2026-08-21 23:00:45 -04:00
Format using clang-format
This commit is contained in:
+14
-14
@@ -1,13 +1,13 @@
|
||||
#include "FileUtil.h"
|
||||
#include <iostream>
|
||||
#include <stdio.h> /* defines FILENAME_MAX */
|
||||
#include <stdio.h> /* defines FILENAME_MAX */
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#define GetCurrentDir _getcwd
|
||||
#include <direct.h>
|
||||
#define GetCurrentDir _getcwd
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#define GetCurrentDir getcwd
|
||||
#include <unistd.h>
|
||||
#define GetCurrentDir getcwd
|
||||
#endif
|
||||
|
||||
std::string FileUtil::GetCurrentWorkingDir() {
|
||||
@@ -17,20 +17,20 @@ std::string FileUtil::GetCurrentWorkingDir() {
|
||||
return current_working_dir;
|
||||
}
|
||||
|
||||
std::string FileUtil::get_file_path(std::vector<std::string> input) {
|
||||
std::string FileUtil::get_file_path(const std::vector<std::string>& input) {
|
||||
std::string currentPath = FileUtil::GetCurrentWorkingDir(); // std::filesystem::current_path();
|
||||
char dirSeparator;
|
||||
|
||||
#ifdef _WIN32
|
||||
dirSeparator = '\\';
|
||||
#else
|
||||
dirSeparator = '/';
|
||||
#endif
|
||||
#ifdef _WIN32
|
||||
dirSeparator = '\\';
|
||||
#else
|
||||
dirSeparator = '/';
|
||||
#endif
|
||||
|
||||
std::string filePath = currentPath;
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
filePath = filePath + dirSeparator + input[i];
|
||||
}
|
||||
for (int i = 0; i < input.size(); i++) {
|
||||
filePath = filePath + dirSeparator + input[i];
|
||||
}
|
||||
|
||||
return filePath;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user