tec
tec copied to clipboard
OS-specific code should be separated into different files
Instead of the maze of #ifdefs in filesystem.cpp, for example, there should be the following:
filesystem.hpp - the header defining the FilePath class
filesystem.cpp - the implementation of everything OS-independent
filesystem-win32.cpp - the implementation of everything Win32-specific
filesystem-unix.cpp - the implementation of everything that is common to both Linux and macOS
filesystem-macos.cpp - the implementation of everything macOS-specific
filesystem-linux.cpp - the implementation of everything Linux-specific
Is this relevant and needed to get the game done?
Can't get the game done if the code is a mess