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 account linked to committer's email address
6 changed files with 7 additions and 20 deletions

View File

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

View File

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

View File

@ -6,8 +6,6 @@
#include "simulation/SimulationData.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)):
textureGen(textureGen),
toolID(id),

View File

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

View File

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

View File

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