Skip to content

Conversation

@Ashod
Copy link
Contributor

@Ashod Ashod commented Nov 22, 2025

  • wsd: include cleanup
  • wsd: include config.h in .cpp only
  • wsd: typedef -> using
  • wsd: use =default instead of empty implementation
  • wsd: make uninherited classes final

It's best to have config.h only
in .cpp files, and always as the
first include, rather than in .hpp.

This is because having .hpp include
config.h makes it impossible to guarantee
that config.h is the first to be included.

This causes major, but possibly silent
and hidden, breaks due to the config.h
directives not being effective on
headers included before it. This will
happen for example when the .hpp that
has the config.h is not the first to
be included in the .cpp. All the .hpp
files included before it will not have
the config.h and therefore checking/using
the directives will yield a different
result, breaking consistency.

Change-Id: I6a262965fc3cdbb9cf36985bcbde8a000b03693d
Signed-off-by: Ashod Nakashian <[email protected]>
It's best to have config.h only
in .cpp files, and always as the
first include, rather than in .hpp.

This is because having .hpp include
config.h makes it impossible to guarantee
that config.h is the first to be included.

This causes major, but possibly silent
and hidden, breaks due to the config.h
directives not being effective on
headers included before it. This will
happen for example when the .hpp that
has the config.h is not the first to
be included in the .cpp. All the .hpp
files included before it will not have
the config.h and therefore checking/using
the directives will yield a different
result, breaking consistency.

Change-Id: Iacfdd348643e3bf25834968dd9cda9d95a2efdac
Signed-off-by: Ashod Nakashian <[email protected]>
More readable.

Change-Id: I8e2c5f9eb5f9af97a5b161e8ad2d508bdf55c888
Signed-off-by: Ashod Nakashian <[email protected]>
Change-Id: I157ac26367e14ebd9939d4b1dec1a35ee104251d
Signed-off-by: Ashod Nakashian <[email protected]>
Change-Id: I90498b9faefb81df2c554bc0a1b35628a372402c
Signed-off-by: Ashod Nakashian <[email protected]>
@Ashod Ashod changed the title private/ash/misc inc Include and Header Cleanup Nov 22, 2025
@Ashod Ashod requested a review from caolanm November 22, 2025 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: To Review

Development

Successfully merging this pull request may close these issues.

1 participant