libcvd-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libcvd-members] libcvd/cvd image.h


From: Gerhard Reitmayr
Subject: [libcvd-members] libcvd/cvd image.h
Date: Tue, 06 May 2008 23:04:38 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Gerhard Reitmayr <gerhard>      08/05/06 23:04:38

Modified files:
        cvd            : image.h 

Log message:
        avoid allocation of tmp image, if no resize is necessary (image not 
shared and right size)

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/image.h?cvsroot=libcvd&r1=1.37&r2=1.38

Patches:
Index: image.h
===================================================================
RCS file: /cvsroot/libcvd/libcvd/cvd/image.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- image.h     23 Apr 2008 20:30:08 -0000      1.37
+++ image.h     6 May 2008 23:04:38 -0000       1.38
@@ -677,10 +677,7 @@
                ///@param copy The image to copy
                void copy_from(const BasicImage<T>& copy)
                {
-                       Image<T> tmp(copy.size());
-
-                       *this = tmp;
-                       
+            resize(copy.size());
                        std::copy(copy.begin(), copy.end(), this->begin());
                }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]