aboutsummaryrefslogtreecommitdiff
path: root/src/shared/vmap/DebugCmdLogger.cpp
diff options
context:
space:
mode:
authorpanaut0lordv <panaut0lordv@gmail.com>2009-05-06 19:30:34 +0200
committerpanaut0lordv <panaut0lordv@gmail.com>2009-05-06 19:30:34 +0200
commitb3de9cdff7581ae8e81313ba7db466987f593fd4 (patch)
tree25041dd695b303fe9239b517905c6fe54c7e6b1e /src/shared/vmap/DebugCmdLogger.cpp
parent8cd49be2ff898cffd06beb6168e90e46aa7b7a66 (diff)
Fix compile for gcc 4.4.
--HG-- branch : trunk
Diffstat (limited to 'src/shared/vmap/DebugCmdLogger.cpp')
-rw-r--r--src/shared/vmap/DebugCmdLogger.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/shared/vmap/DebugCmdLogger.cpp b/src/shared/vmap/DebugCmdLogger.cpp
index de656f4cfc5..8a518a83b44 100644
--- a/src/shared/vmap/DebugCmdLogger.cpp
+++ b/src/shared/vmap/DebugCmdLogger.cpp
@@ -20,6 +20,12 @@
#include "DebugCmdLogger.h"
+//#ifdef _DEBUG
+//#define DEB(x) x
+//#else
+#define DEB(x)
+//#endif
+
using namespace G3D;
namespace VMAP
@@ -97,25 +103,25 @@ namespace VMAP
bool CommandFileRW::getNewCommands(Array<Command>& pCmdArray)
{
bool result = false;
- FILE* f = fopen(iFileName.c_str(), "rb");
- if(f)
+DEB( FILE* f = fopen(iFileName.c_str(), "rb");)
+DEB( if(f))
{
Command cmd;
- if(fseek(f, iLastPos, SEEK_SET) == 0) { result = true; }
+DEB( if(fseek(f, iLastPos, SEEK_SET) == 0) { result = true; })
while(result)
{
- if(fread(&cmd, sizeof(Command), 1, f) != 1)
+DEB( if(fread(&cmd, sizeof(Command), 1, f) != 1))
{
result = false;
}
- iLastPos = ftell(f);
+DEB( iLastPos = ftell(f);)
if(cmd.getType() == STOP)
{
break;
}
pCmdArray.append(cmd);
}
- fclose(f);
+DEB( fclose(f);)
}
if(result)
{