Skip to content

Minor cleanups#315

Merged
texus merged 6 commits intotexus:1.xfrom
jjuhl:minor-cleanups
Feb 12, 2026
Merged

Minor cleanups#315
texus merged 6 commits intotexus:1.xfrom
jjuhl:minor-cleanups

Conversation

@jjuhl
Copy link
Contributor

@jjuhl jjuhl commented Feb 11, 2026

Hi Texus

Yet another batch of tiny cleanups for you :)

The common style is "char*", not "char *".
remove the redundant const keyword.
When the header doesn't need the include but the implementation does,
the include should be in the implementation file. Unneeded includes in
headers slow down compilation time needlessly for everyone including
the header.
@jjuhl jjuhl force-pushed the minor-cleanups branch 2 times, most recently from 9f5535e to c60f838 Compare February 11, 2026 19:27
@texus
Copy link
Owner

texus commented Feb 11, 2026

I'm a bit worried about the includes being removed from src/Filesystem.cpp, even though CI seems happy about it.
I placed a comment next to those headers to indicate for which function they were being included. Both stat and errno are still used in that source file even though the includes are now gone. So either it gets stat and errno from some other includes, or that specific code isn't being compiled in any of the tests (since it is platform-specific and depends on another define).

Remove some #include's from files that don't directly use the types
declared in those includes.
Unneeded includes just slow down compilation and also leads to users
accidentally depending on transitive includes.
@jjuhl
Copy link
Contributor Author

jjuhl commented Feb 12, 2026

You make some good points. I've removed that bit of the commit.

@texus texus merged commit e44acf6 into texus:1.x Feb 12, 2026
15 checks passed
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.

2 participants