wkjarosz / hdrview

A simple research-oriented image viewer with an emphasis on examining and comparing high-dynamic range (HDR) images, and including minimalistic editing and tonemapping capabilities.
Other
291 stars 11 forks source link

Fix emscripten compil (cast window size to float) #120

Closed pthom closed 6 months ago

pthom commented 6 months ago

This fixes the following error:

[ 82%] Building CXX object CMakeFiles/HDRView.dir/src/app.cpp.o
hdrview/src/app.cpp:1592:27: error: non-constant-expression cannot be narrowed from type 'int' to 'float' in initializer list [-Wc++11-narrowing-const-reference]
 1592 |     display_size = float2{window_width(), window_height()};
      |                           ^~~~~~~~~~~~~~
hdrview/src/app.cpp:1592:43: error: non-constant-expression cannot be narrowed from type 'int' to 'float' in initializer list [-Wc++11-narrowing-const-reference]
 1592 |     display_size = float2{window_width(), window_height()};
      |                                           ^~~~~~~~~~~~~~~
wkjarosz commented 6 months ago

Thanks @pthom !