[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
new[]
is a no-no, since it'll not use delete[] and this results in BADNESS
9000.
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.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/libcvd/cvd/internal/io/jpeg.h?cvsroot=libcvd&r1=1.2&r2=1.3
Patches:
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());
}
}
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [libcvd-members] libcvd/cvd/internal/io jpeg.h,
Georg Klein <=