From 8379f5e73c6d9614a066a1e1c52b4c6857278eaa Mon Sep 17 00:00:00 2001 From: Marco Antonio Jaguaribe Costa Date: Tue, 3 Jan 2023 11:16:49 -0300 Subject: [PATCH] Normalize line endings with a .gitattribute file ... and make sure they stay that way. What this does is: * Ensure that every file checked into the repo uses LF line endings. Currently it's all over the place, including 2 files which had both CRLF and LF in them. People can still whichever they prefer when cloning the repo, just tweak core.autocrlf to their taste, e.g. usually 'true' on Windows and 'input' on Linux/macOS * Added an override so that Visual Studio files always use CRLF, just to be safe, VS certainly handles LF just fine for those files. Please don't review this line by line, it's just the .gitattributes file and once it's saved you run 'git add --renormalize .' to make all line endings in the repo consistent. If you want to do the same to the files in your working tree, run 'git rm --cached -r .' then 'git reset --hard' reference: https://www.aleksandrhovhannisyan.com/blog/crlf-vs-lf-normalizing-line-endings-in-git/ and https://rehansaeed.com/gitattributes-best-practices/ --- .gitattributes | 2 ++ ext/VFS/include/vfs/Core/vfs_types.h | 8 ++++---- legion cfg.cpp | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 000000000..032c1bd1c --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +* text=auto + diff --git a/ext/VFS/include/vfs/Core/vfs_types.h b/ext/VFS/include/vfs/Core/vfs_types.h index 131b78674..4ab7878ff 100644 --- a/ext/VFS/include/vfs/Core/vfs_types.h +++ b/ext/VFS/include/vfs/Core/vfs_types.h @@ -24,10 +24,10 @@ #ifndef _VFS_TYPES_H_ #define _VFS_TYPES_H_ -#include - -#ifdef __linux__ -# include +#include + +#ifdef __linux__ +# include #endif namespace vfs diff --git a/legion cfg.cpp b/legion cfg.cpp index 2004c497e..c48489d7e 100644 --- a/legion cfg.cpp +++ b/legion cfg.cpp @@ -274,4 +274,4 @@ void LoadGameLegionOptions() gGameLegionOptions.LaptopLinkFuneral = iniReader.ReadBoolean("Laptop Settings","LINK_FUNERAL", TRUE); gGameLegionOptions.LaptopLinkBobby = iniReader.ReadBoolean("Laptop Settings","LINK_BOBBY", FALSE); gGameLegionOptions.fBobbyRSite = iniReader.ReadBoolean("Laptop Settings","BOBBY_SITE_ACCESSED", FALSE); -} +}