Fix compiler warning from qualifier in static_cast
The const qualifier present in the type for a static_cast generates a compiler warning. Remove the const qualifier as it is troublesome and unnecessary.
Regards change introduced in !39434 (merged)
Tag @tsulaia
Edited by Frank Berghaus