build: Fix compile error when building without RETAIL_COMPATIBLE_CRC#2318
build: Fix compile error when building without RETAIL_COMPATIBLE_CRC#2318xezon wants to merge 2 commits intoTheSuperHackers:mainfrom
Conversation
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngine/Source/GameLogic/Object/Object.cpp | Single-character fix: .c_str() → .str() on AsciiString return from toHexString() in the non-RETAIL_COMPATIBLE_CRC debug CRC logging path. Correct and safe. |
| GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Object.cpp | Identical single-character fix: .c_str() → .str() on AsciiString return from toHexString() in the non-RETAIL_COMPATIBLE_CRC debug CRC logging path. Correct and safe. |
Flowchart
flowchart TD
A["Object::crc() called"] --> B{"RETAIL_COMPATIBLE_CRC?"}
B -- Yes --> C["xferUser with sizeof(Int64)"]
B -- No --> D["xferUser with sizeof(m_objectUpgradesCompleted)"]
C --> E{"DEBUG_CRC && doLogging?"}
D --> E
E -- No --> G["Continue CRC processing"]
E -- Yes --> F{"RETAIL_COMPATIBLE_CRC?"}
F -- Yes --> H["tmp.format with %I64X"]
F -- No --> I["tmp.format with toHexString().str()
(was .c_str() — compile error)"]
H --> G
I --> G
Last reviewed commit: 49c4fc6
Skyaero42
left a comment
There was a problem hiding this comment.
Should we maybe add a build in the pipeline that also compiles at least one version without RETAIL_COMPATIBLE_CRC, now that so much code is encapsulated with this guard?
|
Yes we could do that. |
Please create a task for this and assign to me, I will look at this ASAP. Do we want this for all variations or only vc6/win32 release. |
This change fixes a compile error when building without
RETAIL_COMPATIBLE_CRC.