Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

notbonzo-com
Copy link

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.

…s to resolve issues caused by unity builds interfering with LSP functionality. This ensures better code clarity and maintainability.
@purifiedfr
Copy link

lgtm

@notbonzo-com
Copy link
Author

I can't this ass compiler has to be a pain in the ass as always.

Comment on lines +334 to +337

compile_commands.json
.cache
Copy link
Owner

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)
Copy link
Owner

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>
Copy link
Owner

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>
Copy link
Owner

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>
Copy link
Owner

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>
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants