Skip to content

Commit 9a1c29f

Browse files
Quipyowert2stephanemagnenat
authored andcommitted
Fix "xtime: ambiguous symbol" errors w/ Visual Studio.
1 parent f16de59 commit 9a1c29f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+86
-40
lines changed

libgag/src/TrueTypeFont.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <fribidi/fribidi.h>
2929
#endif
3030

31-
using namespace std;
3231
#define MAX_CACHE_SIZE 128
3332

3433
namespace GAGCore

libusl/src/code.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
#include <sstream>
1010

11-
using namespace std;
11+
using std::ostringstream;
12+
using std::string;
1213

1314
ThunkPrototype* thisMember(Prototype* outer)
1415
{

libusl/src/debug.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#include "code.h"
44
#include "native.h"
55

6-
using namespace std;
6+
using std::string;
77

88
const Position& ThunkDebugInfo::find(size_t address) const
99
{

libusl/src/interpreter.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <iostream>
88

9-
using namespace std;
9+
using std::for_each;
1010

1111
bool Thread::step()
1212
{
@@ -81,16 +81,12 @@ size_t Thread::run()
8181

8282
void Thread::markForGC()
8383
{
84-
using namespace std;
85-
8684
// mark all frames in stack
8785
for_each(frames.begin(), frames.end(), [](auto& frame) {frame.markForGC(); });
8886
}
8987

9088
void Thread::Frame::markForGC()
9189
{
92-
using namespace std;
93-
9490
// mark all variables in frame
9591
for_each(stack.begin(), stack.end(), [](auto& value) {value->markForGC(); });
9692
thunk->markForGC();

libusl/src/lexer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
#include <cassert>
55
#include <sstream>
66

7-
using namespace std;
7+
using std::ostringstream;
8+
using std::string;
9+
using std::endl;
810

911
const Token::Type Lexer::tokenTypes[] =
1012
{

libusl/src/memory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
#include "interpreter.h"
33
#include "types.h"
44

5-
using namespace std;
5+
using std::for_each;
6+
using std::mem_fun;
67

78
void Heap::collectGarbage()
89
{

libusl/src/parser.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
#include "error.h"
44
#include <memory>
55

6-
using namespace std;
6+
using std::string;
7+
using std::unique_ptr;
78

89
void Parser::parse(BlockNode* block)
910
{

libusl/src/tree.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
#include "types.h"
66
#include <sstream>
77

8-
using namespace std;
8+
using std::stringstream;
9+
using std::ostringstream;
10+
using std::endl;
911

1012

1113
void Node::generate(ThunkPrototype* thunk, DebugInfo* debug, Code* code)

libusl/src/types.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
#include <cassert>
1010
#include <algorithm>
1111

12-
using namespace std;
1312

1413
void Value::dump(std::ostream &stream) const
1514
{

libusl/src/types.h

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,15 @@ struct Prototype: Value
6565
virtual void dumpSpecific(std::ostream& stream) const
6666
{
6767
stream << ": ";
68-
using namespace std;
68+
using std::transform;
69+
using std::ostream_iterator;
70+
using std::string;
6971
transform(members.begin(), members.end(), ostream_iterator<string>(stream, " "), [](auto& member) {return member.first; });
7072
}
7173

7274
virtual void propagateMarkForGC()
7375
{
74-
using namespace std;
76+
using std::for_each;
7577
for_each(members.begin(), members.end(), [this](auto& member) {dynamic_cast<Value*>(member.second)->markForGC(); });
7678
}
7779

@@ -157,7 +159,8 @@ struct Scope: Thunk
157159

158160
virtual void propagateMarkForGC()
159161
{
160-
using namespace std;
162+
using std::for_each;
163+
using std::mem_fun;
161164
for_each(locals.begin(), locals.end(), mem_fun(&Value::markForGC));
162165
}
163166

0 commit comments

Comments
 (0)