forked from maximegmd/CyberEngineTweaks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
114 changed files
with
15,324 additions
and
13,083 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,21 @@ | ||
--- | ||
BasedOnStyle: Microsoft | ||
--- | ||
Language: Cpp | ||
|
||
BasedOnStyle: LLVM | ||
AccessModifierOffset: -4 | ||
AlwaysBreakTemplateDeclarations: Yes | ||
AlignAfterOpenBracket: AlwaysBreak | ||
AlignEscapedNewlines: Left | ||
AlignOperands: true | ||
AllowShortCaseLabelsOnASingleLine: true | ||
AllowShortFunctionsOnASingleLine: InlineOnly | ||
AllowShortLambdasOnASingleLine: Inline | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
IndentBraces: true | ||
BreakBeforeBraces: Allman | ||
BreakConstructorInitializers: BeforeComma | ||
BreakInheritanceList: BeforeComma | ||
KeepEmptyLinesAtTheStartOfBlocks: false | ||
NamespaceIndentation: Inner | ||
ColumnLimit: 180 | ||
IndentWidth: 4 | ||
PenaltyBreakFirstLessLess: 180 | ||
PointerAlignment: Left | ||
SpaceAfterTemplateKeyword: false | ||
|
||
BreakBeforeBraces: Custom | ||
BraceWrapping: | ||
AfterCaseLabel: true | ||
AfterClass: true | ||
AfterControlStatement: Always | ||
AfterEnum: true | ||
AfterFunction: true | ||
AfterNamespace: true | ||
AfterStruct: true | ||
AfterUnion: true | ||
AfterExternBlock: true | ||
BeforeCatch: true | ||
BeforeElse: true | ||
IndentBraces: false | ||
SplitEmptyFunction: true | ||
SplitEmptyRecord: true | ||
SplitEmptyNamespace: true | ||
SortIncludes: Never | ||
SpaceBeforeParensOptions: | ||
AfterControlStatements: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import os | ||
import time | ||
import subprocess | ||
|
||
def format_cpp_file(file_path, clang_format_path): | ||
# Run clang-format on the file to format it | ||
subprocess.run(["clang-format", "-i", file_path, "-style=file:" + clang_format_path, "-fallback-style=none"]) | ||
|
||
def recursive_directory_iteration(directory, clang_format_path): | ||
# Iterate over all of the files in the directory | ||
for filename in os.listdir(directory): | ||
# Get the full path of the file | ||
file_path = os.path.join(directory, filename) | ||
|
||
# If the file is a directory, recursively iterate over it | ||
if os.path.isdir(file_path): | ||
recursive_directory_iteration(file_path, clang_format_path) | ||
# If the file is a cpp file, format it | ||
elif file_path.endswith(".cpp") or file_path.endswith(".h") or file_path.endswith(".hpp"): | ||
format_cpp_file(file_path, clang_format_path) | ||
|
||
print("Formatting C++ files...") | ||
|
||
path = os.getcwd() + "\\.clang-format" | ||
if not os.path.exists(path): | ||
print("Could not find clang format config at " + path) | ||
exit() | ||
|
||
print("Found clang format config at " + path) | ||
|
||
start_time = time.time() | ||
# Start the recursive iteration from the current directory | ||
recursive_directory_iteration(os.getcwd() + "/src", path) | ||
|
||
print("Done formatting C++ files after " + str(time.time() - start_time) + " seconds") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ struct CET | |
static bool IsRunning() noexcept; | ||
|
||
private: | ||
|
||
CET(); | ||
|
||
Paths m_paths; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ struct Paths | |
const std::filesystem::path& TweakDB() const; | ||
|
||
private: | ||
|
||
friend struct CET; | ||
|
||
Paths(); | ||
|
Oops, something went wrong.