[Liblas-commits] hg: return a const& instead of a temporary for setting the heade...

liblas-commits at liblas.org liblas-commits at liblas.org
Mon Jun 20 11:24:18 EDT 2011


details:   http://hg.liblas.orghg/rev/bba2d8862ef7
changeset: 2958:bba2d8862ef7
user:      Howard Butler <hobu.inc at gmail.com>
date:      Mon Jun 20 10:23:55 2011 -0500
description:
return a const& instead of a temporary for setting the header on the TransformPtr

diffstat:

 src/c_api.cpp |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r ecd2f60cfb35 -r bba2d8862ef7 src/c_api.cpp
--- a/src/c_api.cpp	Fri Jun 17 10:40:12 2011 -0500
+++ b/src/c_api.cpp	Mon Jun 20 10:23:55 2011 -0500
@@ -433,7 +433,7 @@
 
     try {
         liblas::Reader* reader = ((liblas::Reader*) hReader);
-        liblas::Header h = reader->GetHeader();
+        liblas::Header const& h = reader->GetHeader();
         liblas::SpatialReference in_ref = h.GetSRS();
         liblas::SpatialReference* out_ref = ((liblas::SpatialReference*) hSRS);
         std::vector<liblas::TransformPtr> transforms = reader->GetTransforms();


More information about the Liblas-commits mailing list