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

Fix compile error on macOS #55085

Merged
merged 1 commit into from
Feb 4, 2022
Merged

Fix compile error on macOS #55085

merged 1 commit into from
Feb 4, 2022

Conversation

BrettDong
Copy link
Member

Summary

None

Purpose of change

#54693 breaks macOS build:

Error: src/widget.cpp:395:31: error: loop variable 'val' is always a copy because the range of type 'JsonArray' does not return a reference [-Werror,-Wrange-loop-analysis]
        for( const JsonValue &val : jo.get_array( "bodyparts" ) ) {
                              ^
src/widget.cpp:395:14: note: use non-reference type 'JsonValue'
        for( const JsonValue &val : jo.get_array( "bodyparts" ) ) {
             ^~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [obj/tiles/widget.o] Error 1

Describe the solution

Change reference to value.

Describe alternatives you've considered

Testing

Additional context

@BrettDong BrettDong added Code: Build Issues regarding different builds and build environments OS: macOS Issues related to macOS / OSX operating system labels Feb 4, 2022
@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions astyled astyled PR, label is assigned by github actions labels Feb 4, 2022
@dseguin
Copy link
Member

dseguin commented Feb 4, 2022

Thanks!

@github-actions github-actions bot added the BasicBuildPassed This PR builds correctly, label assigned by github actions label Feb 4, 2022
@kevingranade kevingranade merged commit b5fddbb into master Feb 4, 2022
@kevingranade kevingranade deleted the compile branch February 4, 2022 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Code: Build Issues regarding different builds and build environments json-styled JSON lint passed, label assigned by github actions OS: macOS Issues related to macOS / OSX operating system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants