-
Notifications
You must be signed in to change notification settings - Fork 971
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Explicit Includes in most headers #4389
Conversation
…s to resolve issues caused by unity builds interfering with LSP functionality. This ensures better code clarity and maintainability.
lgtm |
I can't this ass compiler has to be a pain in the ass as always. |
|
||
compile_commands.json | ||
.cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make unnecessary changes.
@@ -21,7 +22,7 @@ class WatchedSounds { | |||
|
|||
[[nodiscard]] bool hasSound(int soundGuid) const noexcept | |||
{ | |||
// can not use std::ranges::find() because it tries to link with __std_find_trivial_4 | |||
// can not use std::ranges::find() because it tries to link with __std_find_trivial_4 (then why no use std::find) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make unnecessary changes. The comment applies also to std::find.
@@ -1,8 +1,8 @@ | |||
#pragma once | |||
|
|||
#include <array> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::array is used in this file
#include "HostageOutlineGlowContext.h" | ||
#include <Features/Visuals/OutlineGlow/GrenadeProjectileOutlineGlow/GrenadeProjectileOutlineGlowContext.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HostageOutlineGlowContext
is the correct one here. GrenadeProjectileOutlineGlowContext
is just wrongly used below.
@@ -1,6 +1,6 @@ | |||
#pragma once | |||
|
|||
#include <algorithm> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
std::ranges::lower_bound()
is from <algorithm>
@@ -4,6 +4,8 @@ | |||
#include <CS2/Classes/Color.h> | |||
#include <GameClasses/SceneObject.h> | |||
#include <Platform/Macros/IsPlatform.h> | |||
#include <MemoryPatterns/Linux/GlowSceneObjectPatternsLinux.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will cause build error on Windows - use MemoryPatterns/PatternTypes/ClientPatternTypes.h
instead
Added explicit includes for all necessary dependencies in header files to resolve issues caused by unity builds interfering with LSP functionality. This ensures better code clarity and maintainability. Also removed some useless imports. Project still builds and works on linux, windows has not been tested.