refactor(WideChar): centralize project wide-character type - #3321
CryoTheRenegade wants to merge 5 commits into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. WalkthroughThe change adds shared ChangesWideChar type migration
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Merge Risk: 🟠 High · up to The Autorun error-message path may fail to compile or format messages after the string migration, leaving a serious merge-blocking compatibility risk. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: 718733c9-df83-434c-8c04-9d8f36bf2e55
📒 Files selected for processing (44)
Core/GameEngine/Include/GameNetwork/GameSpy/PeerThread.hCore/GameEngine/Include/GameNetwork/GameSpy/ThreadUtils.hCore/GameEngine/Source/GameClient/LanguageFilter.cppCore/GameEngine/Source/GameNetwork/GameSpy/Thread/BuddyThread.cppCore/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cppCore/GameEngine/Source/GameNetwork/GameSpy/Thread/ThreadUtils.cppCore/Libraries/Include/Lib/BaseType.hCore/Libraries/Include/Lib/PathUtil.hCore/Libraries/Source/WWVegas/WWLib/INI.hCore/Libraries/Source/WWVegas/WWLib/WWCommon.hCore/Libraries/Source/WWVegas/WWLib/ini.cppCore/Libraries/Source/WWVegas/WWLib/readline.cppCore/Libraries/Source/WWVegas/WWLib/readline.hCore/Libraries/Source/WWVegas/WWLib/stringex.hCore/Libraries/Source/WWVegas/WWLib/trim.cppCore/Libraries/Source/WWVegas/WWLib/trim.hCore/Libraries/Source/WWVegas/WWLib/utf8.cppCore/Libraries/Source/WWVegas/WWLib/utf8.hCore/Tools/Autorun/DrawButton.cppCore/Tools/Autorun/DrawButton.hCore/Tools/Autorun/GameText.cppCore/Tools/Autorun/GameText.hCore/Tools/Autorun/Locale_API.cppCore/Tools/Autorun/Locale_API.hCore/Tools/Autorun/TTFont.cppCore/Tools/Autorun/TTFont.hCore/Tools/Autorun/Utils.cppCore/Tools/Autorun/Utils.hCore/Tools/Autorun/Wnd_File.hCore/Tools/Autorun/Wnd_file.cppCore/Tools/Autorun/autorun.cppCore/Tools/Autorun/locale.cppCore/Tools/Babylon/transcs.cppCore/Tools/Launcher/Toolkit/Support/UTypes.hDependencies/Utility/CMakeLists.txtDependencies/Utility/Utility/WideChar.hDependencies/Utility/Utility/string_adapter.hGenerals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cppGenerals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cppGenerals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cppGeneralsMD/Code/GameEngine/Source/Common/System/SaveGame/GameState.cppGeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cppGeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cppGeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
💤 Files with no reviewable changes (33)
- Dependencies/Utility/Utility/WideChar.h
- GeneralsMD/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp
- Generals/Code/GameEngine/Source/Common/System/SaveGame/GameState.cpp
- Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
- Core/Tools/Babylon/transcs.cpp
- Core/Tools/Autorun/DrawButton.cpp
- Core/Libraries/Source/WWVegas/WWLib/readline.h
- Core/Tools/Autorun/TTFont.h
- Core/GameEngine/Source/GameClient/LanguageFilter.cpp
- GeneralsMD/Code/Tools/WorldBuilder/src/playerlistdlg.cpp
- Core/Libraries/Source/WWVegas/WWLib/trim.h
- GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp
- Core/Tools/Autorun/Utils.h
- Core/Libraries/Source/WWVegas/WWLib/ini.cpp
- Core/Tools/Autorun/GameText.h
- Core/Tools/Autorun/Wnd_File.h
- Core/Tools/Autorun/locale.cpp
- Core/Tools/Autorun/DrawButton.h
- Core/Libraries/Source/WWVegas/WWLib/utf8.cpp
- Generals/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/PopupReplay.cpp
- GeneralsMD/Code/GameEngine/Source/GameClient/GUI/GUICallbacks/Menus/ReplayMenu.cpp
- Core/Libraries/Source/WWVegas/WWLib/INI.h
- Core/Libraries/Include/Lib/PathUtil.h
- Core/Libraries/Source/WWVegas/WWLib/trim.cpp
- Core/Tools/Launcher/Toolkit/Support/UTypes.h
- Core/Tools/Autorun/Utils.cpp
- Core/Libraries/Source/WWVegas/WWLib/stringex.h
- Core/Libraries/Source/WWVegas/WWLib/readline.cpp
- Core/Libraries/Source/WWVegas/WWLib/utf8.h
- Core/Tools/Autorun/Wnd_file.cpp
- Core/Tools/Autorun/Locale_API.h
- Core/Tools/Autorun/Locale_API.cpp
- Core/Tools/Autorun/TTFont.cpp
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
02d13e7 to
84ec924
Compare
84ec924 to
4e3ceae
Compare
xezon
left a comment
There was a problem hiding this comment.
There are still several unrelated refactors made. Probably autoformat by the IDE (try disable it)
|
The change description is outdated. |
| /****************************************************************************/ | ||
| int Locale_Init ( int language, char *file ); | ||
| void Locale_Restore (); | ||
| const wchar_t* Locale_GetString( const char *id, wchar_t *buffer = nullptr, int size = _MAX_PATH ); |
There was a problem hiding this comment.
Autorun, same as WWVegas, currently does not use game base types. Therefore it should refer to unichar for now.
| wchar_t wc; | ||
| wchar_t mb; | ||
| WideChar wc; | ||
| WideChar mb; |
As requested here
Centralize the existing
WideChartypedef inLib/WideChar.hand replace direct project uses ofwchar_twith it. Standard wide strings now usestd::basic_string<WideChar>.This prepares for later ICU work while preserving the current representation and behavior.
WideCharstill aliaseswchar_t, and existing string containers remain in place. Changing the representation later will also require adapting wide literals, character traits, and CRT/platform APIs.AI assistance was used to validate this refactor