Skip to content

Commit 1e1d5dd

Browse files
committed
[GEN] Fix stringstream for Generals Tools build (TheSuperHackers#537)
1 parent 2c459b6 commit 1e1d5dd

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

Generals/Code/Tools/mangler/wlib/wdebug.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ will you be ready to leave grasshopper.
5858
#include "wstypes.h"
5959

6060
#include <Utility/iostream_adapter.h>
61+
#include <Utility/sstream_adapter.h>
6162

6263
#if !defined(_WINDOWS)
6364
// Windows headers have a tendency to redefine IN
@@ -195,7 +196,7 @@ extern CritSec DebugLibSemaphore;
195196
strstream __s;\
196197
__s << __FILE__ << "[" << __LINE__ << \
197198
"]: " << ##V << " = " << V << '\n' << '\0';\
198-
OutputDebugString(__s.str());\
199+
OutputDebugString(STRSTREAM_CSTR(__s));\
199200
DEBUGUNLOCK; \
200201
}
201202

@@ -209,7 +210,7 @@ extern CritSec DebugLibSemaphore;
209210
strstream __s;\
210211
__s << "DBG [" << __FILE__ << \
211212
" " << __LINE__ << "] " << X << '\n' << '\0';\
212-
OutputDebugString(__s.str());\
213+
OutputDebugString(STRSTREAM_CSTR(__s));\
213214
DEBUGUNLOCK; \
214215
}
215216

@@ -221,7 +222,7 @@ extern CritSec DebugLibSemaphore;
221222
(*(MsgManager::debugStream())) << X;\
222223
strstream __s;\
223224
__s << X << '\0';\
224-
OutputDebugString(__s.str());\
225+
OutputDebugString(STRSTREAM_CSTR(__s));\
225226
DEBUGUNLOCK; \
226227
}
227228

@@ -235,7 +236,7 @@ extern CritSec DebugLibSemaphore;
235236
strstream __s;\
236237
__s << __FILE__ << "[" << __LINE__ << \
237238
"]: " << ##X << '\n' << '\0';\
238-
OutputDebugString(__s.str());\
239+
OutputDebugString(STRSTREAM_CSTR(__s));\
239240
DEBUGUNLOCK; \
240241
}
241242

Generals/Code/Tools/matchbot/mydebug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ will you be ready to leave grasshopper.
5858
#include "wstypes.h"
5959

6060
#include <Utility/iostream_adapter.h>
61+
#include <Utility/sstream_adapter.h>
6162

6263
#ifdef USE_SEM
6364
#include "sem4.h"

Generals/Code/Tools/matchbot/wlib/wdebug.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ will you be ready to leave grasshopper.
5858
#include "wstypes.h"
5959

6060
#include <Utility/iostream_adapter.h>
61+
#include <Utility/sstream_adapter.h>
6162

6263
#if !defined(_WINDOWS)
6364
// Windows headers have a tendency to redefine IN
@@ -195,7 +196,7 @@ extern CritSec DebugLibSemaphore;
195196
strstream __s;\
196197
__s << __FILE__ << "[" << __LINE__ << \
197198
"]: " << ##V << " = " << V << '\n' << '\0';\
198-
OutputDebugString(__s.str());\
199+
OutputDebugString(STRSTREAM_CSTR(__s));\
199200
DEBUGUNLOCK; \
200201
}
201202

@@ -209,7 +210,7 @@ extern CritSec DebugLibSemaphore;
209210
strstream __s;\
210211
__s << "DBG [" << __FILE__ << \
211212
" " << __LINE__ << "] " << X << '\n' << '\0';\
212-
OutputDebugString(__s.str());\
213+
OutputDebugString(STRSTREAM_CSTR(__s));\
213214
DEBUGUNLOCK; \
214215
}
215216

@@ -221,7 +222,7 @@ extern CritSec DebugLibSemaphore;
221222
(*(MsgManager::debugStream())) << X;\
222223
strstream __s;\
223224
__s << X << '\0';\
224-
OutputDebugString(__s.str());\
225+
OutputDebugString(STRSTREAM_CSTR(__s));\
225226
DEBUGUNLOCK; \
226227
}
227228

@@ -235,7 +236,7 @@ extern CritSec DebugLibSemaphore;
235236
strstream __s;\
236237
__s << __FILE__ << "[" << __LINE__ << \
237238
"]: " << ##X << '\n' << '\0';\
238-
OutputDebugString(__s.str());\
239+
OutputDebugString(STRSTREAM_CSTR(__s));\
239240
DEBUGUNLOCK; \
240241
}
241242

0 commit comments

Comments
 (0)