-
-
Notifications
You must be signed in to change notification settings - Fork 680
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve: rework in pugi::cast and others fixes #734
Merged
Merged
Conversation
This file contains 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
beats-dh
approved these changes
Jan 2, 2023
QuebradaZN
approved these changes
Jan 3, 2023
Removed CustomFlag Fixed some wrong conversion from xml to int types Fixed size of "flags" in Group struct to bool Fixed PlayerFlags_t to uint8_t, value is ever 0 or 1 (boolean) and converted enum to enum class Fixed npc ignore god and not walking if not see player Added reload to groups Rework in pugi::cast, added new std::from_chars from c++20 to convert from string to integer safe
5cf7359
to
b3521e4
Compare
beats-dh
approved these changes
Jan 4, 2023
Kudos, SonarCloud Quality Gate passed! |
5 tasks
dudantas
added a commit
to dudantas/canary
that referenced
this pull request
Feb 7, 2023
Attention!!! From this change, pugi::cast will throw an exception when there is any overflow or data loss when converting, which means that it may crash if you write incorrect values in the "values" fields of the XML, so be careful. Fixes opentibiabr#733 • Removed the "CustomFlag" as it was not necessary to use it, we already have the "PlayerFlag". • Fixed wrong size in some types in XML load. • Fixed the size of "PlayerFlags" in the groups class and changed it to uint8_t, as it is only used for the value 0 and 1 (boolean). • Fixed for the NPC not to walk or speak if there are no players nearby or if there are only players with the "ignoredbynpcs" flag. • Enums converted to enum class, making it easier to manage enums using magic_enum. • Added reload groups. • Rework of pugi::cast to the new std::from_chars of c++ 20, which more safely converts strings to integers and handles possible data loss better.
jacksonie
pushed a commit
to jacksonie/canary
that referenced
this pull request
Feb 17, 2023
Attention!!! From this change, pugi::cast will throw an exception when there is any overflow or data loss when converting, which means that it may crash if you write incorrect values in the "values" fields of the XML, so be careful. Fixes opentibiabr#733 • Removed the "CustomFlag" as it was not necessary to use it, we already have the "PlayerFlag". • Fixed wrong size in some types in XML load. • Fixed the size of "PlayerFlags" in the groups class and changed it to uint8_t, as it is only used for the value 0 and 1 (boolean). • Fixed for the NPC not to walk or speak if there are no players nearby or if there are only players with the "ignoredbynpcs" flag. • Enums converted to enum class, making it easier to manage enums using magic_enum. • Added reload groups. • Rework of pugi::cast to the new std::from_chars of c++ 20, which more safely converts strings to integers and handles possible data loss better.
luan
pushed a commit
that referenced
this pull request
Jul 11, 2023
Attention!!! From this change, pugi::cast will throw an exception when there is any overflow or data loss when converting, which means that it may crash if you write incorrect values in the "values" fields of the XML, so be careful. Fixes #733 • Removed the "CustomFlag" as it was not necessary to use it, we already have the "PlayerFlag". • Fixed wrong size in some types in XML load. • Fixed the size of "PlayerFlags" in the groups class and changed it to uint8_t, as it is only used for the value 0 and 1 (boolean). • Fixed for the NPC not to walk or speak if there are no players nearby or if there are only players with the "ignoredbynpcs" flag. • Enums converted to enum class, making it easier to manage enums using magic_enum. • Added reload groups. • Rework of pugi::cast to the new std::from_chars of c++ 20, which more safely converts strings to integers and handles possible data loss better.
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.
Description
Attention!!! From this pull request, pugi::cast will throw an exception when there is any overflow or data loss when converting, which means that it may crash if you write incorrect values in the "values" fields of the XML, so be careful.
Fixes #733
# (issue)
Type of change