cpp: Do not use namespace using-directives
Use using-declarations instead. [build/namespaces]
This commit is contained in:
parent
cdcf29e46a
commit
aa1852b2cc
|
@ -17,6 +17,8 @@
|
|||
#include <string>
|
||||
#include "endgame.h"
|
||||
|
||||
using std::string;
|
||||
|
||||
#ifdef ENDGAME_LEARNING
|
||||
static constexpr int endgameHashSize = 0x1000000; // 16M
|
||||
HashMap<Key, Endgame> endgameHashMap(endgameHashSize);
|
||||
|
|
|
@ -21,13 +21,10 @@
|
|||
|
||||
#ifdef ENDGAME_LEARNING
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "hashmap.h"
|
||||
#include "types.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace CTSL;
|
||||
using CTSL::HashMap;
|
||||
|
||||
static const int SAVE_ENDGAME_EVERY_N_GAMES = 256;
|
||||
|
||||
|
|
14
src/misc.cpp
14
src/misc.cpp
|
@ -57,7 +57,17 @@ typedef bool (*fun3_t)(HANDLE, CONST GROUP_AFFINITY*, PGROUP_AFFINITY);
|
|||
#include "misc.h"
|
||||
#include "thread.h"
|
||||
|
||||
using namespace std;
|
||||
using std::cerr;
|
||||
using std::cin;
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::ifstream;
|
||||
using std::iostream;
|
||||
using std::ofstream;
|
||||
using std::setfill;
|
||||
using std::setw;
|
||||
using std::streambuf;
|
||||
using std::stringstream;
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -524,7 +534,7 @@ void bindThisThread(size_t)
|
|||
|
||||
/// best_group() retrieves logical processor information using Windows specific
|
||||
/// API and returns the best group id for the thread with index idx. Original
|
||||
/// code from Texel by Peter Österlund.
|
||||
/// code from Texel by Peter A-terlund.
|
||||
|
||||
int best_group(size_t idx)
|
||||
{
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include "stopwatch.h"
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
using std::vector;
|
||||
|
||||
namespace Search {
|
||||
|
||||
|
|
|
@ -30,18 +30,22 @@
|
|||
#include "engine_main.h"
|
||||
#endif
|
||||
|
||||
ThreadPool Threads; // Global object
|
||||
|
||||
#ifdef OPENING_BOOK
|
||||
#include <deque>
|
||||
using namespace std;
|
||||
#endif
|
||||
|
||||
using std::cout;
|
||||
using std::endl;
|
||||
using std::fixed;
|
||||
using std::setprecision;
|
||||
|
||||
#if _MSC_VER >= 1600
|
||||
#pragma warning(disable : 4695)
|
||||
#pragma execution_character_set("ANSI")
|
||||
#endif
|
||||
|
||||
ThreadPool Threads; // Global object
|
||||
|
||||
/// Thread constructor launches the thread and waits until it goes to sleep
|
||||
/// in idle_loop(). Note that 'searching' and 'exit' should be already set.
|
||||
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
#include <QObject>
|
||||
#endif // QT_GUI_LIB
|
||||
|
||||
using std::string;
|
||||
|
||||
/// Thread class keeps together all the thread-related stuff. We use
|
||||
/// per-thread pawn and material hash tables so that once we get a
|
||||
/// pointer to an entry its life time is unlimited and we don't have
|
||||
|
|
Loading…
Reference in New Issue