[Wavelet-commit] Wavelet GreymapWriter.cc, 1.2, 1.3 StillImage.cc, 1.10, 1.11
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2007-05-22 14:55:52
|
Update of /cvsroot/wavelet/Wavelet In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv22191 Modified Files: GreymapWriter.cc StillImage.cc Log Message: Fixed polymorphic-exception problem which popped up while using g++ 4.x... Index: GreymapWriter.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/GreymapWriter.cc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GreymapWriter.cc 10 Aug 2005 09:35:23 -0000 1.2 --- GreymapWriter.cc 22 May 2007 14:55:44 -0000 1.3 *************** *** 28,32 **** int success = 0; ! /* * First check whether file is writeable... --- 28,32 ---- int success = 0; ! /* * First check whether file is writeable... *************** *** 40,44 **** } } ! if (success == 0) { --- 40,44 ---- } } ! if (success == 0) { *************** *** 46,53 **** pixelize (); ! success = writefmt (); } ! if (success < 0) { --- 46,53 ---- pixelize (); ! success = writefmt (); } ! if (success < 0) { *************** *** 56,60 **** } ! void GreymapWriter::pixelize (void) { --- 56,60 ---- } ! void GreymapWriter::pixelize (void) { Index: StillImage.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/StillImage.cc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** StillImage.cc 14 Apr 2006 11:47:06 -0000 1.10 --- StillImage.cc 22 May 2007 14:55:44 -0000 1.11 *************** *** 78,97 **** } ! bool StillImage::epsilons (Image &si, coeff epsilon) const { return ((StillImage*)this)->m_coeffs->epsilons (((StillImage*)&si)->m_coeffs, ! epsilon); } ! bool StillImage::equals (Image &si) const ! { return ((StillImage*)this)->m_coeffs->epsilons (((StillImage*)&si)->m_coeffs, ! COEFF_EPSILON); } #ifndef _WIN32_WCE ! void StillImage::read (char const * fname, int rawy, int rawx) { --- 78,97 ---- } ! bool StillImage::epsilons (Image &si, coeff epsilon) const { return ((StillImage*)this)->m_coeffs->epsilons (((StillImage*)&si)->m_coeffs, ! epsilon); } ! bool StillImage::equals (Image &si) const ! { return ((StillImage*)this)->m_coeffs->epsilons (((StillImage*)&si)->m_coeffs, ! COEFF_EPSILON); } #ifndef _WIN32_WCE ! void StillImage::read (char const * fname, int rawy, int rawx) { *************** *** 136,143 **** DELETE (ir); } ! catch (const exception &error) { DELETENOTNULL (ir); ! throw error; } m_ysize = m_coeffs->rows (); --- 136,143 ---- DELETE (ir); } ! catch (...) { DELETENOTNULL (ir); ! throw; } m_ysize = m_coeffs->rows (); *************** *** 146,150 **** } ! void StillImage::write (char const *fname, bool beautify) { --- 146,150 ---- } ! void StillImage::write (char const *fname, bool beautify) { *************** *** 158,162 **** GreymapWriter *iw = NULL; bool ispixel = true; ! if (ftype == fn_unknown) { --- 158,162 ---- GreymapWriter *iw = NULL; bool ispixel = true; ! if (ftype == fn_unknown) { *************** *** 197,201 **** if (this->size () > 0 && ! (beautify || (ispixel && (m_asteps - m_ssteps > 0 || (this->smin () < 0))))) { --- 197,201 ---- if (this->size () > 0 && ! (beautify || (ispixel && (m_asteps - m_ssteps > 0 || (this->smin () < 0))))) { *************** *** 208,215 **** DELETE (iw); } ! catch (const exception &error) { DELETENOTNULL (iw); ! throw error; } --- 208,227 ---- DELETE (iw); } ! catch (...) { + DELETE (m_coeffs); + m_coeffs = backup; + + DELETE (m_acol); + m_acol = NEW (ColumnVector (m_coeffs)); + + DELETE (m_arow); + m_arow = NEW (RowVector (m_coeffs)); + + DELETE (m_afull); + m_afull = NEW (FullVector (m_coeffs)); + DELETENOTNULL (iw); ! throw; } *************** *** 237,241 **** } ! void StillImage::resize (int rows, int cols) { --- 249,253 ---- } ! void StillImage::resize (int rows, int cols) { |