[Top][All Lists]

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

[libcvd-members] libcvd/cvd/internal/io jpeg.h

From: Georg Klein
Subject: [libcvd-members] libcvd/cvd/internal/io jpeg.h
Date: Tue, 19 Jun 2007 12:01:52 +0000

CVSROOT:        /cvsroot/libcvd
Module name:    libcvd
Changes by:     Georg Klein <georgklein>        07/06/19 12:01:52

Modified files:
        cvd/internal/io: jpeg.h 

Log message:
        Replaced auto_ptr'd array[] with a static array[]. Using auto_ptr with 
        is a no-no, since it'll not use delete[] and this results in BADNESS 
        I'm sure there was a good reason not to use a static array in the first
        place (exception if you can't make one that big perhaps?) so maybe 
there's a
        better way.


Index: jpeg.h
RCS file: /cvsroot/libcvd/libcvd/cvd/internal/io/jpeg.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- jpeg.h      28 Nov 2005 19:18:59 -0000      1.2
+++ jpeg.h      19 Jun 2007 12:01:52 -0000      1.3
@@ -59,10 +59,10 @@
   template <class T, class S> struct JPEGReader {
     static void read(BasicImage<T>& im, jpeg_in& jpeg) {
-      std::auto_ptr<S> rowbuf(new S[jpeg.x_size()]);
+      S rowbuf[jpeg.x_size()];
       for (int r=0; r<jpeg.y_size(); r++) {
-       jpeg.get_raw_pixel_lines((byte*)rowbuf.get(), 1);
-       Pixel::ConvertPixels<S,T>::convert(rowbuf.get(), im[r], jpeg.x_size());
+       jpeg.get_raw_pixel_lines((byte*)rowbuf, 1);
+       Pixel::ConvertPixels<S,T>::convert(rowbuf, im[r], jpeg.x_size());

reply via email to

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