alacarte-maps / alacarte

Renderer for OpenStreetMap tiles.
https://alacarte-maps.github.io/
Other
58 stars 18 forks source link

uint64_t xy2hilbert(FixedPoint p) is unused and throws cppcheck errors #100

Open florianjacob opened 7 years ago

florianjacob commented 7 years ago

See https://github.com/alacarte-maps/alacarte/blob/master/src/utils/transform.cpp#L137 , error is thrown in https://github.com/alacarte-maps/alacarte/blob/master/src/utils/transform.cpp#L144

error:

[utils/transform.cpp:144]: (error) Shifting 32-bit value by 32 bits is undefined behaviour [utils/transform.cpp:144]: (error) Signed integer overflow for expression '1<<r'. [utils/transform.cpp:144]: (error) Signed integer overflow for expression '(1<<r)-1'.

function does not seem to be used. @TheMarex Can this function be thrown away, or do you want to use this somewhere?