2025-01-07 03:08 AM - edited 2025-01-07 05:35 AM
Dear Gfx Team,
CWRUtil::toQ5 causes Cube compiler giving this warning
c:\TouchGFX\4.24.1\touchgfx\framework\include\touchgfx\widgets\canvas\CWRUtil.hpp
../touchgfx/widgets/canvas/CWRUtil.hpp: In instantiation of 'static touchgfx::CWRUtil::Q5 touchgfx::CWRUtil::toQ5(T) [with T = float]':
../touchgfx/widgets/canvas/Canvas.hpp:120:36: required from here
../touchgfx/widgets/canvas/CWRUtil.hpp:518:31: warning: arithmetic between floating-point type 'float' and enumeration type 'touchgfx::Rasterizer::<unnamed enum>' is deprecated [-Wdeprecated-enum-float-conversion]
518 | return Q5((int)(value * Rasterizer::POLY_BASE_SIZE));
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Could you possibly cast Rasterizer::POLY_BASE_SIZE to the static_cast<T> :
static Q5 toQ5(T value)
{
return Q5(static_cast<int>(value * static_cast<T>(Rasterizer::POLY_BASE_SIZE)));
}
What do you think ?
Solved! Go to Solution.
2025-01-07 05:06 AM
Hello @ferro ,
Thank you for your feedback!
I will report it to the team and I will keep you updated.
I am personally unaware of this function, can you tell me in which file it is located?
Regards,
2025-01-07 05:06 AM
Hello @ferro ,
Thank you for your feedback!
I will report it to the team and I will keep you updated.
I am personally unaware of this function, can you tell me in which file it is located?
Regards,
2025-01-07 05:29 AM
"can you tell me in which file it is located?"
c:\TouchGFX\4.24.1\touchgfx\framework\include\touchgfx\widgets\canvas\CWRUtil.hpp
2025-01-07 05:32 AM
Thank you @ferro !