Skip to content
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 14 commits into from
May 11, 2020

Conversation

Fris0uman
Copy link
Contributor

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

Copy link
Member

@anothersimulacrum anothersimulacrum left a 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.

src/bionics_ui.cpp Show resolved Hide resolved
src/bionics_ui.cpp Show resolved Hide resolved
src/bionics.cpp Show resolved Hide resolved
src/bionics.cpp Show resolved Hide resolved
src/bionics.cpp Show resolved Hide resolved
@mlangsdorf mlangsdorf added Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style Mechanics: Character / Player Character / Player mechanics labels May 5, 2020
@Fris0uman Fris0uman marked this pull request as ready for review May 8, 2020 10:03
@kevingranade kevingranade merged commit 961ec1b into CleverRaven:master May 11, 2020
Coolthulhu referenced this pull request in cataclysmbnteam/Cataclysm-BN Mar 20, 2021
@Fris0uman Fris0uman deleted the bodyenumless branch December 21, 2021 20:20
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants