diff src/core/filesystem.cpp @ 15:cde8f67a7c7d

*: update, megacommit :)
author Paper <mrpapersonic@gmail.com>
date Tue, 19 Sep 2023 22:36:08 -0400
parents fc1bf97c528b
children 28d8f4c0ae12
line wrap: on
line diff
--- a/src/core/filesystem.cpp	Tue Sep 19 16:33:07 2023 -0400
+++ b/src/core/filesystem.cpp	Tue Sep 19 22:36:08 2023 -0400
@@ -1,22 +1,22 @@
 #ifdef WIN32
-#include <shlobj.h>
+#	include <shlobj.h>
 #elif defined(MACOSX)
-#include "sys/osx/filesystem.h"
+#	include "sys/osx/filesystem.h"
 #elif defined(__linux__)
-#include <pwd.h>
-#include <sys/types.h>
+#	include <pwd.h>
+#	include <sys/types.h>
 #endif
 
 #ifdef WIN32
-#define DELIM "\\"
+#	define DELIM "\\"
 #else
-#define DELIM "/"
-#include <unistd.h>
-#include <errno.h>
+#	define DELIM "/"
+#	include <errno.h>
+#	include <unistd.h>
 #endif
 
+#include "core/config.h"
 #include "core/filesystem.h"
-#include "core/config.h"
 #include <limits.h>
 
 namespace Filesystem {
@@ -26,8 +26,7 @@
 	size_t start;
 	size_t end = 0;
 
-	while ((start = path.find_first_not_of(DELIM, end)) != std::string::npos)
-	{
+	while ((start = path.find_first_not_of(DELIM, end)) != std::string::npos) {
 		end = path.find(DELIM, start);
 		temp.append(path.substr(start, end - start));
 #ifdef WIN32
@@ -73,14 +72,14 @@
 #else // just assume POSIX
 	if (getenv("HOME") != NULL)
 		ret += getenv("HOME");
-#ifdef __linux__
+#	ifdef __linux__
 	else
 		ret += getpwuid(getuid())->pw_dir;
-#endif // __linux__
+#	endif // __linux__
 	if (!ret.empty())
 		ret += DELIM ".config" DELIM CONFIG_DIR DELIM CONFIG_NAME;
-#endif // !WIN32 && !MACOSX
+#endif     // !WIN32 && !MACOSX
 	return ret;
 }
 
-}
+} // namespace Filesystem