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

Fix: Don't polute global namespace with std. #1193

Merged

Conversation

cbirkhold
Copy link
Contributor

using namespace ...; in a (especially a public) header file is bad form.

props.hxx does collapse the std namespace into the global namespace which can lead to problems in client libraries.

Of course there may also be client code out there now that depends on this which would require that code to either add std:: in some places or add using namespace std in the right places (which hopefully is inside another namespace or a compilation unit.

Copy link

codecov bot commented Nov 22, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 24.96%. Comparing base (9f64ced) to head (70eb717).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/input_output/FGPropertyManager.h 33.33% 2 Missing ⚠️
src/models/propulsion/FGTurbine.h 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1193   +/-   ##
=======================================
  Coverage   24.96%   24.96%           
=======================================
  Files         170      170           
  Lines       19283    19283           
=======================================
  Hits         4814     4814           
  Misses      14469    14469           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@cbirkhold cbirkhold force-pushed the feature/fix-dont-polute-global-namespace branch 2 times, most recently from ff5d5d2 to a0b14d8 Compare November 23, 2024 03:56
@bcoconni bcoconni force-pushed the feature/fix-dont-polute-global-namespace branch from a0b14d8 to 70eb717 Compare November 24, 2024 16:26
@bcoconni
Copy link
Member

Good catch ! PR merged.

@bcoconni bcoconni merged commit be7bcea into JSBSim-Team:master Nov 24, 2024
29 checks passed
bcoconni pushed a commit to bcoconni/jsbsim that referenced this pull request Nov 24, 2024
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