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

Replace using namespace in headers with explicit namespaces. #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

carlosperate
Copy link

This PR is one part to resolve issue lancaster-university/codal-microbit-v2#240:

To avoid namespace pollution headers should not use using namespace codal;, and instead it can be added into any .cpp files that needed (all of them in this repo).

I still need to test this PR in isolation with a normal CODAL build, so I'll leave this as a draft PR until I've finished that.

@carlosperate
Copy link
Author

carlosperate commented Jan 1, 2023

Okay, had to leave the using namespace codal in the NRF52PWM.h header file, as some .cpp files in codal-microbit-v2 depended on it. Once we fixed all the namespacing in codal-microbit-v2 we can remove it from NRF52PWM.h in a different PR.

I think this approach, keeping some of the namespace in this PR so that is safe to merge, even if it means more PRs in total, is probably a bit easier to manage than orchestrating several PRs to be merged in order.

@carlosperate carlosperate marked this pull request as ready for review January 1, 2023 17:10
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.

None yet

1 participant