LAStools / LAStools

efficient tools for LiDAR processing
Other
895 stars 371 forks source link

las2las: branch never taken #26

Closed kjk closed 7 years ago

kjk commented 7 years ago

In https://github.com/LAStools/LAStools/blob/master/src/las2las.cpp#L792 there is:

if (set_ogc_wkt) // maybe also set the OCG WKT 
{
    ....
} else if (set_ogc_wkt) // maybe only set the OCG WKT 
{
   **** this part will never execute ******
   ....
}

I'm not sure what the intent here was but the part in else if (set_ogc_wkt) branch will never execute.

If set_ogc_wkt is true, then one the first if () branch will execute. If it's false, then neither will execute.

rapidlasso commented 7 years ago

Not true. The bracketing of the code is:

if (geoprojection ...) { if (set_ogc_wkt) // maybe also set the OCG WKT { .... } } else if (set_ogc_wkt) // maybe only set the OCG WKT { .... }