diff --git a/source/code/BlockGame.cpp b/source/code/BlockGame.cpp index 08bd331..a883b32 100644 --- a/source/code/BlockGame.cpp +++ b/source/code/BlockGame.cpp @@ -36,7 +36,11 @@ http://blockattack.net #include "stageclearhandler.hpp" #include -using namespace std; +using std::string; +using std::stringstream; +using std::cerr; +using std::endl; +using std::vector; static stringstream converter; diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp index 8efde0e..1f261cf 100644 --- a/source/code/MenuSystem.cpp +++ b/source/code/MenuSystem.cpp @@ -30,7 +30,11 @@ http://www.blockattack.net static int mousex; static int mousey; -using namespace std; +using std::string; +using std::cerr; +using std::cout; +using std::endl; +using std::vector; ButtonGfx standardButton; diff --git a/source/code/ReadKeyboard.cpp b/source/code/ReadKeyboard.cpp index 695cec5..6aa1f35 100644 --- a/source/code/ReadKeyboard.cpp +++ b/source/code/ReadKeyboard.cpp @@ -25,7 +25,9 @@ http://blockattack.net #include "utf8.h" #include -using namespace std; +using std::string; +using std::cerr; +using std::endl; ReadKeyboard::ReadKeyboard(void) { maxLength = 16; diff --git a/source/code/ScoresDisplay.cpp b/source/code/ScoresDisplay.cpp index 5156ebc..73a6258 100644 --- a/source/code/ScoresDisplay.cpp +++ b/source/code/ScoresDisplay.cpp @@ -27,7 +27,10 @@ http://www.blockattack.net #include "stats.h" #include "MenuSystem.h" -using namespace std; +using std::string; +using std::cerr; +using std::endl; +using std::vector; static void NFont_Write(SDL_Renderer* target, int x, int y, const char* text) { nf_standard_blue_font.draw(target, x, y, "%s", text); diff --git a/source/code/common.cpp b/source/code/common.cpp index e3edb43..1938286 100644 --- a/source/code/common.cpp +++ b/source/code/common.cpp @@ -29,7 +29,13 @@ http://www.blockattack.net #include "sago/SagoMisc.hpp" #include -using namespace std; +using std::string; +using std::stringstream; +using std::ios_base; +using std::cerr; +using std::endl; +using std::map; +using std::vector; using boost::format; static stringstream converter; diff --git a/source/code/main.cpp b/source/code/main.cpp index 6c570f9..6124d51 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -85,7 +85,12 @@ http://www.blockattack.net *******************************************************************************/ #include "mainVars.inc" -using namespace std; +using std::string; +using std::cerr; +using std::cout; +using std::endl; +using std::exception; +using std::vector; static int InitImages(sago::SagoSpriteHolder& holder); diff --git a/source/code/menudef.cpp b/source/code/menudef.cpp index ff71d67..1cea4fc 100644 --- a/source/code/menudef.cpp +++ b/source/code/menudef.cpp @@ -27,7 +27,10 @@ http://blockattack.net #include "MenuSystem.h" #include "common.h" -using namespace std; +using std::string; +using std::cerr; +using std::endl; +using std::vector; #if 0 //Menu diff --git a/source/code/puzzlehandler.cpp b/source/code/puzzlehandler.cpp index 357bcda..9653b39 100644 --- a/source/code/puzzlehandler.cpp +++ b/source/code/puzzlehandler.cpp @@ -31,7 +31,10 @@ http://blockattack.net #include "cereal/archives/json.hpp" #include "sago/SagoMisc.hpp" -using namespace std; +using std::string; +using std::cerr; +using std::endl; +using std::vector; const int maxNrOfPuzzleStages = 50; //Maximum number of puzzle stages diff --git a/source/code/sago/SagoMisc.cpp b/source/code/sago/SagoMisc.cpp index cb7ae43..83d8998 100644 --- a/source/code/sago/SagoMisc.cpp +++ b/source/code/sago/SagoMisc.cpp @@ -29,7 +29,10 @@ #include #include -using namespace std; +using std::string; +using std::cerr; +using std::endl; +using std::vector; namespace sago { diff --git a/source/code/sago/SagoSpriteHolder.cpp b/source/code/sago/SagoSpriteHolder.cpp index 1db61d0..1c8b543 100644 --- a/source/code/sago/SagoSpriteHolder.cpp +++ b/source/code/sago/SagoSpriteHolder.cpp @@ -39,7 +39,11 @@ //I truely hate the C way of checking for equal. Usually read: "if not X compares to Y then they must be equal" #define strequal(X,Y) strcmp(X,Y)==0 -using namespace std; +using std::string; +using std::cerr; +using std::cout; +using std::endl; +using std::vector; namespace sago { diff --git a/source/code/stageclearhandler.cpp b/source/code/stageclearhandler.cpp index b48903f..959992a 100644 --- a/source/code/stageclearhandler.cpp +++ b/source/code/stageclearhandler.cpp @@ -54,7 +54,10 @@ std::vector stageScores(nrOfStageLevels); //--||-- Sint32 totalScore = 0; Sint32 totalTime = 0; -using namespace std; +using std::string; +using std::cerr; +using std::endl; +using std::vector; static void SaveStageClearStages() { std::stringstream ss; diff --git a/source/code/stats.cpp b/source/code/stats.cpp index 8a124f9..4be57ae 100644 --- a/source/code/stats.cpp +++ b/source/code/stats.cpp @@ -27,7 +27,12 @@ http://www.blockattack.net #include "sago/SagoMisc.hpp" #include -using namespace std; +using std::string; +using std::stringstream; +using std::cerr; +using std::endl; +using std::map; +using std::vector; Stats* Stats::instance = nullptr;