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

Remove using namespace std and add std:: qualifications where needed #1185

Merged
merged 1 commit into from
Jul 11, 2022

Conversation

p12tic
Copy link
Contributor

@p12tic p12tic commented Jul 11, 2022

using namespace std; is generally an antipattern as it imports a huge number of common names into the global namespace. We already qualify names with std:: in majority of cases and using namespace std is not actually needed most of the time. This commit addresses a small number of remaining cases where std:: is missing and removes all using namespace std, thus achieving consistent code.

`using namespace std;` is generally an antipattern as it imports a huge
number of common names into the global namespace. We already qualify
names with std:: in majority of cases and `using namespace std` is not
actually needed most of the time. This commit addresses a small number
of remaining cases where std:: is missing and removes all `using
namespace std`, thus achieving consistent code.
@simogasp simogasp added this to the 2.5.0 milestone Jul 11, 2022
@p12tic
Copy link
Contributor Author

p12tic commented Jul 11, 2022

CI fails due to a network issue and is unrelated to the PR:

 [DEBUG] Downloading http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
  [DEBUG] Download failed -- retrying after 1000 ms.
  [DEBUG] Download failed -- retrying after 2000 ms.
  [DEBUG] Download failed -- retrying after 4000 ms.
  Error: Failed to download from mirror set:
  http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz: WinHttpSendRequest() failed: 12002
  http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz: WinHttpSendRequest() failed: 12002
  http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz: WinHttpSendRequest() failed: 12002
  http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz: WinHttpSendRequest() failed: 12002

@fabiencastan
Copy link
Member

Thanks a lot for this cleanup!

@fabiencastan fabiencastan merged commit 2b8d7d3 into alicevision:develop Jul 11, 2022
@p12tic p12tic deleted the remove-using-namespace-std branch July 11, 2022 17:53
@p12tic
Copy link
Contributor Author

p12tic commented Jul 11, 2022

That was fast turnaround, thanks!

@fabiencastan
Copy link
Member

A simple and clean PR with a description: I would love to see more PRs like that ;)

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

Successfully merging this pull request may close these issues.

3 participants