mosra / magnum

Lightweight and modular C++11 graphics middleware for games and data visualization
https://magnum.graphics/
Other
4.77k stars 439 forks source link

Return EM_BOOL from emscripten callback lambdas to fix build on 3.1.62 #641

Closed Twinklebear closed 3 months ago

Twinklebear commented 3 months ago

In Emscripten 3.1.62 the type def for EM_BOOL was changed from int to bool, see emscripten 3.1.61 EM_BOOL vs. emscripten 3.1.62 EM_BOOL. This change broke the EmscriptenApplication's callback registration calls since the lambdas are marked as returning Int and no longer have the right type. This PR fixes this issue by changing the return type to EM_BOOL so it should build on both Emscripten 3.1.61 and 3.1.62

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.31%. Comparing base (b5c784d) to head (86b8c8c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #641 +/- ## ======================================= Coverage 82.31% 82.31% ======================================= Files 563 563 Lines 44124 44124 ======================================= Hits 36321 36321 Misses 7803 7803 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

mosra commented 3 months ago

This makes sense, thank you, and thanks for the background info as well!