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

Merge 101 #12

Merged
merged 17 commits into from
Aug 21, 2020
Merged

Merge 101 #12

merged 17 commits into from
Aug 21, 2020

Conversation

pierotofy
Copy link
Member

No description provided.

oleg-alexandrov and others added 17 commits November 29, 2019 16:15
Add num_threads flag to allow deterministic computation.
Clang 7 warnings show:

    libs/tex/generate_texture_patches.cpp:130:9: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses]
        if (!settings.tone_mapping == TONE_MAPPING_NONE) {
            ^                      ~~
    libs/tex/generate_texture_patches.cpp:130:9: note: add parentheses after the '!' to evaluate the comparison first
        if (!settings.tone_mapping == TONE_MAPPING_NONE) {
            ^
             (                                         )
    libs/tex/generate_texture_patches.cpp:130:9: note: add parentheses around left hand side expression to silence this warning
        if (!settings.tone_mapping == TONE_MAPPING_NONE) {
            ^
            (                     )

`!` binds tigther than `==`, so what was there so far was
`if ((!settings.tone_mapping) == TONE_MAPPING_NONE) {`
which is semantically incorrect.

It is still bug-free currently because only values `0` and `1` in enum

    enum ToneMapping {
        TONE_MAPPING_NONE = 0,
        TONE_MAPPING_GAMMA = 1
    };

but as soon as add a third value will be added, this would be wrong.

This commit fixes it by directly checking `TONE_MAPPING_GAMMA` for applying
the `gamma_correct()` function.
Fix technically incorrect comparison in tone mapping.
Fix compile error. The VERSION constant is conflicting with ROS
Use a unique name for another variable
@pierotofy pierotofy merged commit c831cf7 into master Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants