Skip to content

Commit

Permalink
gsdx: Remove "using namespace std"
Browse files Browse the repository at this point in the history
  • Loading branch information
turtleli authored and gregory38 committed Sep 8, 2017
1 parent 82d1aba commit fe2dfdb
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions plugins/GSdx/stdafx.h
Expand Up @@ -118,9 +118,6 @@ typedef int64 sint64;
#include <mutex> #include <mutex>
#include <condition_variable> #include <condition_variable>
#include <functional> #include <functional>

using namespace std;

#include <memory> #include <memory>


#include <zlib.h> #include <zlib.h>
Expand Down

3 comments on commit fe2dfdb

@hockland
Copy link

@hockland hockland commented on fe2dfdb Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's wrong with having "using namespace std;"

Just about every programmer out there uses that so that you don't have to type all the :: stuff.

@ssakash
Copy link
Member

@ssakash ssakash commented on fe2dfdb Sep 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's generally not a good practice to use using namespace x in your code, it could lead to various conflicts when multiple namespaces are used without any explicit prefix in the namespace functions.

Here's a nice example of such issues: https://stackoverflow.com/questions/2712076/how-to-use-an-iterator

@hockland
Copy link

@hockland hockland commented on fe2dfdb Sep 8, 2017 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.