Nuke using namespace std;

This commit is contained in:
Tamás Bálint Misius 2019-04-20 17:03:23 +02:00
parent 0179cefc78
commit e1b3ddcbcb
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2
6 changed files with 7 additions and 20 deletions

View File

@ -50,8 +50,6 @@
#include "gui/Style.h" #include "gui/Style.h"
#include "gui/interface/Engine.h" #include "gui/interface/Engine.h"
using namespace std;
#define INCLUDE_SYSWM #define INCLUDE_SYSWM
#include "SDLCompat.h" #include "SDLCompat.h"

View File

@ -78,8 +78,6 @@
# undef GetUserName // dammit windows # undef GetUserName // dammit windows
#endif #endif
using namespace std;
class GameController::SearchCallback: public ControllerCallback class GameController::SearchCallback: public ControllerCallback
{ {
GameController * cc; GameController * cc;
@ -1394,17 +1392,18 @@ void GameController::OpenProfile()
void GameController::OpenElementSearch() void GameController::OpenElementSearch()
{ {
vector<Tool*> toolList; std::vector<Tool*> toolList;
vector<Menu*> menuList = gameModel->GetMenuList(); std::vector<Menu*> menuList = gameModel->GetMenuList();
for(std::vector<Menu*>::iterator iter = menuList.begin(), end = menuList.end(); iter!=end; ++iter) { for(auto *mm : menuList)
if(!(*iter)) {
if(!mm)
continue; continue;
vector<Tool*> menuToolList = (*iter)->GetToolList(); std::vector<Tool*> menuToolList = mm->GetToolList();
if(!menuToolList.size()) if(!menuToolList.size())
continue; continue;
toolList.insert(toolList.end(), menuToolList.begin(), menuToolList.end()); toolList.insert(toolList.end(), menuToolList.begin(), menuToolList.end());
} }
vector<Tool*> hiddenTools = gameModel->GetUnlistedTools(); std::vector<Tool*> hiddenTools = gameModel->GetUnlistedTools();
toolList.insert(toolList.end(), hiddenTools.begin(), hiddenTools.end()); toolList.insert(toolList.end(), hiddenTools.begin(), hiddenTools.end());
new ElementSearchActivity(this, toolList); new ElementSearchActivity(this, toolList);
} }

View File

@ -6,8 +6,6 @@
#include "simulation/SimulationData.h" #include "simulation/SimulationData.h"
#include "ElementClasses.h" #include "ElementClasses.h"
using namespace std;
Tool::Tool(int id, String name, String description, int r, int g, int b, ByteString identifier, VideoBuffer * (*textureGen)(int, int, int)): Tool::Tool(int id, String name, String description, int r, int g, int b, ByteString identifier, VideoBuffer * (*textureGen)(int, int, int)):
textureGen(textureGen), textureGen(textureGen),
toolID(id), toolID(id),

View File

@ -14,7 +14,6 @@
#include "PowderToy.h" #include "PowderToy.h"
using namespace ui; using namespace ui;
using namespace std;
Engine::Engine(): Engine::Engine():
FpsLimit(60.0f), FpsLimit(60.0f),
@ -24,9 +23,6 @@ Engine::Engine():
altFullscreen(false), altFullscreen(false),
resizable(false), resizable(false),
lastBuffer(NULL), lastBuffer(NULL),
prevBuffers(stack<pixel*>()),
windows(stack<Window*>()),
mousePositions(stack<Point>()),
state_(NULL), state_(NULL),
windowTargetPosition(0, 0), windowTargetPosition(0, 0),
break_(false), break_(false),

View File

@ -3,8 +3,6 @@
#include <vector> #include <vector>
using namespace std;
class RenderView; class RenderView;
class Renderer; class Renderer;
class RenderModel class RenderModel

View File

@ -9,8 +9,6 @@
#include "game/GameController.h" #include "game/GameController.h"
using namespace std;
GameController * gameController; GameController * gameController;
ui::Engine * engine; ui::Engine * engine;