Skip to content

Commit d704d20

Browse files
committed
Remove using namespace std from header
1 parent 9b2597e commit d704d20

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

cpp/findpath.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
1010

11+
using namespace std;
12+
1113
#include "stlastar.h" // See header for copyright and usage information
1214

1315
#include <iostream>
@@ -17,8 +19,6 @@
1719
#define DEBUG_LISTS 0
1820
#define DEBUG_LIST_LENGTHS_ONLY 0
1921

20-
using namespace std;
21-
2222
// Global data
2323

2424
// The world map

cpp/min_path_to_Bucharest.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
// accurate heuristics. In fact, that is part of the point of this example, in the book you will see Norvig
1818
// mention that the algorithm does some backtracking because the heuristic is not accurate (yet still admissable).
1919
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
20+
21+
using namespace std;
22+
2023
#include "stlastar.h"
2124
#include <iostream>
2225
#include <string>
@@ -26,8 +29,6 @@
2629
#define DEBUG_LISTS 0
2730
#define DEBUG_LIST_LENGTHS_ONLY 0
2831

29-
using namespace std;
30-
3132
const int MAX_CITIES = 20;
3233

3334
enum ENUM_CITIES{Arad=0, Bucharest, Craiova, Drobeta, Eforie, Fagaras, Giurgiu, Hirsova, Iasi, Lugoj, Mehadia, Neamt, Oradea, Pitesti, RimnicuVilcea, Sibiu, Timisoara, Urziceni, Vaslui, Zerind};

cpp/stlastar.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ given where due.
3737
#include <vector>
3838
#include <cfloat>
3939

40-
using namespace std;
41-
4240
// fast fixed size memory allocator, used for fast node memory management
4341
#include "fsa.h"
4442

cpp/tests.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#include <stdio.h>
44
#include <stdlib.h>
55
#include <assert.h>
6+
7+
using namespace std;
8+
69
#include "stlastar.h"
710

811
const int MAP_WIDTH = 20;

0 commit comments

Comments
 (0)