ltog / osmi-addresses

Calculates the Address view of the OSM Inspector
Boost Software License 1.0
11 stars 4 forks source link

m_layer_name uninitialized in Writer.hpp #61

Closed ltog closed 8 years ago

ltog commented 8 years ago

m_layer_name declared in https://github.com/ltog/osmi-addresses/blob/d87af1c6e2727d88ff5c5992b4c82fd9e36ba292/osmi/Writer.hpp#L50 is not initialized anywhere...

Usage of layer_name ( https://github.com/ltog/osmi-addresses/blob/d87af1c6e2727d88ff5c5992b4c82fd9e36ba292/osmi/Writer.hpp#L18 ) should be substituted with m_layer_name.

ltog commented 8 years ago

Strictly speaking, m_layer_name ist not uninitialized, but initialized with the default constructor, which initializes it to an empty string. Therefore no warning is generated, but the behaviour is nevertheless unexpected/undesired and should be fixed.

Further information:

ltog commented 8 years ago

This line wasn't supposed to be commited...

https://github.com/ltog/osmi-addresses/blob/63ef6c2b18d944f8e66fb2e44740184e584f316a/osmi/Writer.hpp#L72