-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Move more body_part to bodypart_id in Character part1 #40144
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/bionics_ui.cpp:275:52: error: loop variable 'elem' has type 'const std::pair<bodypart_str_id, size_t> &' (aka 'const pair<string_id<body_part_type>, unsigned long> &') but is initialized with type 'const std::pair<const string_id<body_part_type>, unsigned long>' resulting in a copy [-Werror,-Wrange-loop-construct]
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^
src/bionics_ui.cpp:275:10: note: use non-reference type 'std::pair<bodypart_str_id, size_t>' (aka 'pair<string_id<body_part_type>, unsigned long>') to keep the copy or type 'const std::pair<const string_id<body_part_type>, unsigned long> &' to prevent copying
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/bionics_ui.cpp:564:68: error: loop variable 'elem' has type 'const std::pair<bodypart_str_id, size_t> &' (aka 'const pair<string_id<body_part_type>, unsigned long> &') but is initialized with type 'const std::pair<const string_id<body_part_type>, unsigned long>' resulting in a copy [-Werror,-Wrange-loop-construct]
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^
src/bionics_ui.cpp:564:26: note: use non-reference type 'std::pair<bodypart_str_id, size_t>' (aka 'pair<string_id<body_part_type>, unsigned long>') to keep the copy or type 'const std::pair<const string_id<body_part_type>, unsigned long> &' to prevent copying
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
make: *** [Makefile:862: obj/tiles/bionics_ui.o] Error 1
make: *** Waiting for unfinished jobs....
src/bionics.cpp:228:52: error: loop variable 'element' has type 'const std::pair<bodypart_str_id, size_t> &' (aka 'const pair<string_id<body_part_type>, unsigned long> &') but is initialized with type 'const std::pair<const string_id<body_part_type>, unsigned long>' resulting in a copy [-Werror,-Wrange-loop-construct]
for( const std::pair<bodypart_str_id, size_t> &element : bid->occupied_bodyparts ) {
^
src/bionics.cpp:228:10: note: use non-reference type 'std::pair<bodypart_str_id, size_t>' (aka 'pair<string_id<body_part_type>, unsigned long>') to keep the copy or type 'const std::pair<const string_id<body_part_type>, unsigned long> &' to prevent copying
for( const std::pair<bodypart_str_id, size_t> &element : bid->occupied_bodyparts ) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/bionics.cpp:2360:52: error: loop variable 'elem' has type 'const std::pair<bodypart_str_id, size_t> &' (aka 'const pair<string_id<body_part_type>, unsigned long> &') but is initialized with type 'const std::pair<const string_id<body_part_type>, unsigned long>' resulting in a copy [-Werror,-Wrange-loop-construct]
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^
src/bionics.cpp:2360:10: note: use non-reference type 'std::pair<bodypart_str_id, size_t>' (aka 'pair<string_id<body_part_type>, unsigned long>') to keep the copy or type 'const std::pair<const string_id<body_part_type>, unsigned long> &' to prevent copying
for( const std::pair<bodypart_str_id, size_t> &elem : bio_id->occupied_bodyparts ) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/bionics.cpp:2389:52: error: loop variable 'elem' has type 'const std::pair<bodypart_str_id, size_t> &' (aka 'const pair<string_id<body_part_type>, unsigned long> &') but is initialized with type 'const std::pair<const string_id<body_part_type>, unsigned long>' resulting in a copy [-Werror,-Wrange-loop-construct]
for( const std::pair<bodypart_str_id, size_t> &elem : bioid->occupied_bodyparts ) {
^
src/bionics.cpp:2389:10: note: use non-reference type 'std::pair<bodypart_str_id, size_t>' (aka 'pair<string_id<body_part_type>, unsigned long>') to keep the copy or type 'const std::pair<const string_id<body_part_type>, unsigned long> &' to prevent copying
for( const std::pair<bodypart_str_id, size_t> &elem : bioid->occupied_bodyparts ) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
mlangsdorf
added
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Mechanics: Character / Player
Character / Player mechanics
labels
May 5, 2020
This was referenced May 10, 2020
Coolthulhu
referenced
this pull request
in cataclysmbnteam/Cataclysm-BN
Mar 20, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Mechanics: Character / Player
Character / Player mechanics
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.
Summary
SUMMARY: Infrastructure "Move more body_part to bodypart_id in Character part1"
Purpose of change
Part of #39068
Describe the solution
Describe alternatives you've considered
Testing
Compile without error
Additional context
Needs #40138