X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=blobdiff_plain;f=Source%2FUtils%2FFolders.hpp;h=c2c85877c2017b74750eb2aa5d37282f25e65d07;hp=c50ab6d3d8c3c0fa787501b2f95c1f07b2b942bf;hb=6a8cb464330e92163c8feaf101b8b5837c973bba;hpb=5fca41ab430df85d6dd620a7f4130df01bc1430f diff --git a/Source/Utils/Folders.hpp b/Source/Utils/Folders.hpp index c50ab6d..c2c8587 100644 --- a/Source/Utils/Folders.hpp +++ b/Source/Utils/Folders.hpp @@ -27,15 +27,17 @@ along with Lugaru. If not, see . #define DATA_DIR "Data" #endif -struct FileNotFoundException: public std::exception +struct FileNotFoundException : public std::exception { std::string errorText; - FileNotFoundException (const std::string& filename) - : errorText(filename + " could not be found") - {} + FileNotFoundException(const std::string& filename) + : errorText(filename + " could not be found") + { + } - const char * what () const throw () { + const char* what() const throw() + { return errorText.c_str(); } }; @@ -60,11 +62,15 @@ public: /* Returns full path for a game resource */ static inline std::string getResourcePath(const std::string& filepath) - { return dataDir + '/' + filepath; } + { + return dataDir + '/' + filepath; + } /** Returns full path for user progress save */ static inline std::string getUserSavePath() - { return getUserDataPath() + "/users"; } + { + return getUserDataPath() + "/users"; + } static bool makeDirectory(const std::string& path);