[Liblas-commits] r1170 - trunk/apps

liblas-commits at liblas.org liblas-commits at liblas.org
Sat Apr 4 19:59:17 EDT 2009


Author: mloskot
Date: Sat Apr  4 19:59:16 2009
New Revision: 1170
URL: http://liblas.org/changeset/1170

Log:
lasmerge.c: xyz_scale and xyz_offset are of static constant size, comparing these objects against nullptr is redundant.

Modified:
   trunk/apps/lasmerge.c

Modified: trunk/apps/lasmerge.c
==============================================================================
--- trunk/apps/lasmerge.c	(original)
+++ trunk/apps/lasmerge.c	Sat Apr  4 19:59:16 2009
@@ -351,21 +351,15 @@
                         LASHeader_GetMaxZ(merged_header));
     }
 
-    if (xyz_scale)
-    {
-        LASHeader_SetScale( merged_header, 
-                            xyz_scale[0], 
-                            xyz_scale[1], 
-                            xyz_scale[2]);
-    }
-
-    if (xyz_offset)
-    {
-        LASHeader_SetOffset(merged_header, 
-                            xyz_offset[0], 
-                            xyz_offset[1], 
-                            xyz_offset[2] );
-    }
+    LASHeader_SetScale( merged_header, 
+                        xyz_scale[0], 
+                        xyz_scale[1], 
+                        xyz_scale[2]);
+
+    LASHeader_SetOffset(merged_header, 
+                        xyz_offset[0], 
+                        xyz_offset[1], 
+                        xyz_offset[2] );
 
     x_scale_factor = LASHeader_GetScaleX(merged_header);
     if (((LASHeader_GetMaxX(merged_header) - LASHeader_GetOffsetX(merged_header)) / LASHeader_GetScaleX(merged_header)) > largest_int ||


More information about the Liblas-commits mailing list