Improve compatibility with Jetbrains IDEs (#3337)

This commit is contained in:
ICYPhoenix7 2024-07-13 04:24:59 -07:00 committed by GitHub
parent 8cb0d18901
commit c75c0d85c8
3 changed files with 11 additions and 7 deletions

4
.gitignore vendored
View File

@ -3,6 +3,10 @@
.vscode/* .vscode/*
!.vscode/launch.json !.vscode/launch.json
.cache/ .cache/
.idea/*
cmake-build-debug-visual-studio/*
cmake-build-release-visual-studio/*
cmake-build-relwithdebinfo-visual-studio/*
# output directory # output directory
build/ build/

View File

@ -11,13 +11,13 @@ Types:
- refactor: Refactoring a specific section of the codebase - refactor: Refactoring a specific section of the codebase
- test: Everything related to testing - test: Everything related to testing
- docs: Everything related to documentation - docs: Everything related to documentation
- chore: Regular code maintanance - chore: Regular code maintenance
A scope is a phrase descibing parts of the code affected by the changes. For example "(userservice)" A scope is a phrase describing parts of the code affected by the changes. For example "(userservice)"
Body (optional) can provide additional contextual information. For breaking changes the body MUST start with "BREAKING CHANGE". Body (optional) can provide additional contextual information. For breaking changes the body MUST start with "BREAKING CHANGE".
Footer (optional) is used to reference issues effected bt the code changes. For example "Fixes #13". Can also be used to indicate breaking changes by starting with "BREAKING CHANGE". Footer (optional) is used to reference issues affected by the code changes. For example "Fixes #13". Can also be used to indicate breaking changes by starting with "BREAKING CHANGE".
#### Structure #### Structure
@ -145,7 +145,7 @@ else
value = 2 value = 2
} }
``` ```
Instead we prefer this: Instead, we prefer this:
```c++ ```c++
int value{2}; int value{2};
if(true) if(true)
@ -205,7 +205,7 @@ void method()
### **Member variables in classes** ### **Member variables in classes**
1. Seperate every variable to a single line 1. Separate every variable to a single line
2. Initialize all member variables 2. Initialize all member variables
3. Use the same order of initialization as in the header file 3. Use the same order of initialization as in the header file
4. Order data types from big to low 4. Order data types from big to low

View File

@ -37,7 +37,7 @@ namespace big
constexpr void end_call() constexpr void end_call()
{ {
// TODO: try to get rid of this // TODO: try to get rid of this
[[assume((cache_handlers(), m_are_handlers_cached == true))]]; [[assume((cache_handlers(), m_are_handlers_cached == true))]]
if (!m_are_handlers_cached) [[unlikely]] if (!m_are_handlers_cached) [[unlikely]]
cache_handlers(); cache_handlers();
@ -65,7 +65,7 @@ namespace big
static rage::scrNativeHandler* get_handlers() static rage::scrNativeHandler* get_handlers()
{ {
[[assume((cache_handlers(), m_are_handlers_cached == true))]]; [[assume((cache_handlers(), m_are_handlers_cached == true))]]
if (!m_are_handlers_cached) [[unlikely]] if (!m_are_handlers_cached) [[unlikely]]
cache_handlers(); cache_handlers();