Implement code changes required to compile Hercules as C++ - #3487
Merged
Merged
Conversation
hemagx
requested review from
MishimaHaruna and
guilherme-gm
and removed request for
guilherme-gm
September 17, 2026 12:17
MrKeiKun
reviewed
Sep 17, 2026
MrKeiKun
left a comment
Contributor
There was a problem hiding this comment.
Nicesu @MishimaHaruna @hemagx
cap_value() vs std::clamp() isn't equivalent. The old macro coped with a backwards min/max; std::clamp treats it as undefined behavior.
Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna
force-pushed
the
compile_cpp
branch
from
September 17, 2026 19:34
5293ecb to
ecb5171
Compare
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
enum look was a leftover from a previous implementation that was outside hercules. The enum represent fake item ids so it has been renamed to avoid the conflict Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna
force-pushed
the
compile_cpp
branch
from
September 17, 2026 20:43
a66aa0a to
376d1e1
Compare
…d automatically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
…d automatically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
…tically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
…tically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
…atically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
…atically cast to that type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna
force-pushed
the
compile_cpp
branch
2 times, most recently
from
September 17, 2026 21:38
07237c1 to
b06831e
Compare
…ropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
… functions to the appropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
… of functions to the appropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…prev}() functions to the appropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…loc family of functions functions to the appropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
… the appropriate expected type This prepares the code to the c++ conversion, removing implicit casts from void* to other pointer types Signed-off-by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…sion Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…s for handling script errors Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
* Changed storage class and visibility of several symbols to ensure they are correctly exported and imported, and that they don't cause ODR violations Signed-off-by: Ibrahim Zidan <brahem@aotsw.com> Co-authored by: Haru <haru@dotalux.com> Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…remove the macros Signed-off-by: Haru <haru@dotalux.com>
… macro Signed-off-by: Haru <haru@dotalux.com>
…ith its c++ expansion Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
…ntax Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
…native annotation [[fallthrough]] Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna
force-pushed
the
compile_cpp
branch
from
September 19, 2026 15:25
30f958c to
2b0dd2e
Compare
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
Signed-off-by: Ibrahim Zidan <brahem@aotsw.com>
…ows it Signed-off-by: Haru <haru@dotalux.com>
The standard C++ [[noreturn]] supersedes it Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna
force-pushed
the
compile_cpp
branch
from
September 19, 2026 21:21
165c564 to
47be818
Compare
MishimaHaruna
approved these changes
Sep 19, 2026
guilherme-gm
approved these changes
Sep 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Prelude
Changes Proposed
Implementing bare-minimum changes to compile hercules code as C++, the changes proposed are mostly fixes to warnings produced by C++ rules, type fixes and type casts and replacement of C features/compile features with their C++ counterpart.
Issues addressed: