Skip to content

Commit cca7e1e

Browse files
committed
[GEN][ZH] Fix DEBUG_CRC compile errors (#771)
1 parent ab88779 commit cca7e1e

File tree

8 files changed

+8
-16
lines changed

8 files changed

+8
-16
lines changed

Generals/Code/GameEngine/Include/GameLogic/Object.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -763,10 +763,8 @@ class Object : public Thing, public Snapshot
763763

764764
}; // end class Object
765765

766-
#ifdef DEBUG_LOGGING
767766
// describe an object as an AsciiString: e.g. "Object 102 (KillerBuggy) [GLARocketBuggy, owned by player 2 (GLAIntroPlayer)]"
768-
AsciiString DescribeObject(const Object *obj);
769-
#endif // DEBUG_LOGGING
767+
AsciiString DebugDescribeObject(const Object *obj);
770768

771769
#if defined(_DEBUG) || defined(_INTERNAL)
772770
#define DEBUG_OBJECT_ID_EXISTS

Generals/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ void Path::computePointOnPath(
743743
ClosestPointOnPathInfo& out
744744
)
745745
{
746-
CRCDEBUG_LOG(("Path::computePointOnPath() fzor %s\n", DescribeObject(obj).str()));
746+
CRCDEBUG_LOG(("Path::computePointOnPath() for %s\n", DebugDescribeObject(obj).str()));
747747

748748
out.layer = LAYER_GROUND;
749749
out.posOnPath.zero();

Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ extern void addIcon(const Coord3D *pos, Real width, Int numFramesDuration, RGBCo
142142

143143
//-------------------------------------------------------------------------------------------------
144144
//-------------------------------------------------------------------------------------------------
145-
#ifdef DEBUG_LOGGING
146-
AsciiString DescribeObject(const Object *obj)
145+
AsciiString DebugDescribeObject(const Object *obj)
147146
{
148147
if (!obj)
149148
return "<No Object>";
@@ -167,7 +166,6 @@ AsciiString DescribeObject(const Object *obj)
167166

168167
return ret;
169168
}
170-
#endif // DEBUG_LOGGING
171169

172170
//-------------------------------------------------------------------------------------------------
173171
//-------------------------------------------------------------------------------------------------

Generals/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2163,7 +2163,7 @@ UpdateSleepTime AIUpdateInterface::doLocomotor( void )
21632163
// obstacles, and follow the intermediate path points.
21642164
ClosestPointOnPathInfo info;
21652165
CRCDEBUG_LOG(("AIUpdateInterface::doLocomotor() - calling computePointOnPath() for %s\n",
2166-
DescribeObject(getObject()).str()));
2166+
DebugDescribeObject(getObject()).str()));
21672167
getPath()->computePointOnPath(getObject(), m_locomotorSet, *getObject()->getPosition(), info);
21682168
onPathDistToGoal = info.distAlongPath;
21692169
goalPos = info.posOnPath;

GeneralsMD/Code/GameEngine/Include/GameLogic/Object.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -811,10 +811,8 @@ class Object : public Thing, public Snapshot
811811

812812
}; // end class Object
813813

814-
#ifdef DEBUG_LOGGING
815814
// describe an object as an AsciiString: e.g. "Object 102 (KillerBuggy) [GLARocketBuggy, owned by player 2 (GLAIntroPlayer)]"
816-
AsciiString DescribeObject(const Object *obj);
817-
#endif // DEBUG_LOGGING
815+
AsciiString DebugDescribeObject(const Object *obj);
818816

819817
#if defined(_DEBUG) || defined(_INTERNAL)
820818
#define DEBUG_OBJECT_ID_EXISTS

GeneralsMD/Code/GameEngine/Source/GameLogic/AI/AIPathfind.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ void Path::computePointOnPath(
760760
ClosestPointOnPathInfo& out
761761
)
762762
{
763-
CRCDEBUG_LOG(("Path::computePointOnPath() fzor %s\n", DescribeObject(obj).str()));
763+
CRCDEBUG_LOG(("Path::computePointOnPath() for %s\n", DebugDescribeObject(obj).str()));
764764

765765
out.layer = LAYER_GROUND;
766766
out.posOnPath.zero();

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ extern void addIcon(const Coord3D *pos, Real width, Int numFramesDuration, RGBCo
152152

153153
//-------------------------------------------------------------------------------------------------
154154
//-------------------------------------------------------------------------------------------------
155-
#ifdef DEBUG_LOGGING
156-
AsciiString DescribeObject(const Object *obj)
155+
AsciiString DebugDescribeObject(const Object *obj)
157156
{
158157
if (!obj)
159158
return "<No Object>";
@@ -177,7 +176,6 @@ AsciiString DescribeObject(const Object *obj)
177176

178177
return ret;
179178
}
180-
#endif // DEBUG_LOGGING
181179

182180
//-------------------------------------------------------------------------------------------------
183181
//-------------------------------------------------------------------------------------------------

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AIUpdate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ UpdateSleepTime AIUpdateInterface::doLocomotor( void )
22052205
// obstacles, and follow the intermediate path points.
22062206
ClosestPointOnPathInfo info;
22072207
CRCDEBUG_LOG(("AIUpdateInterface::doLocomotor() - calling computePointOnPath() for %s\n",
2208-
DescribeObject(getObject()).str()));
2208+
DebugDescribeObject(getObject()).str()));
22092209
getPath()->computePointOnPath(getObject(), m_locomotorSet, *getObject()->getPosition(), info);
22102210
onPathDistToGoal = info.distAlongPath;
22112211
goalPos = info.posOnPath;

0 commit comments

Comments
 (0)