From 0b4e886145bf299cd8a0e88274a6ddb86b815609 Mon Sep 17 00:00:00 2001 From: Christophe Alexandre Date: Fri, 5 Dec 2003 21:18:43 +0000 Subject: [PATCH] UBU est de retour ... entre: CXX=/usr/local/gcc-3.0.4/bin/g++ sur beny CXX=g++3 sur bip et CXX=g++ sur Fedora ... je nage dans le bonheur ... --- alliance/src/ocp/src/common/PCommon.cpp | 1 - alliance/src/ocp/src/common/PCommon.h | 5 +---- alliance/src/ocp/src/placer/PPlacement.cpp | 13 +++++++++++-- alliance/src/ocp/src/placer/PPlacement.h | 4 ---- alliance/src/ocp/src/placer/PPlacementFinal.cpp | 6 +++++- alliance/src/ocp/src/placer/PRow.cpp | 12 ++++++++++-- 6 files changed, 27 insertions(+), 14 deletions(-) diff --git a/alliance/src/ocp/src/common/PCommon.cpp b/alliance/src/ocp/src/common/PCommon.cpp index 1f6a52ac..2e5532ce 100644 --- a/alliance/src/ocp/src/common/PCommon.cpp +++ b/alliance/src/ocp/src/common/PCommon.cpp @@ -2,7 +2,6 @@ #include #include #include -#include #include "PConstants.h" using namespace std; diff --git a/alliance/src/ocp/src/common/PCommon.h b/alliance/src/ocp/src/common/PCommon.h index 7216d0f5..769b48b9 100644 --- a/alliance/src/ocp/src/common/PCommon.h +++ b/alliance/src/ocp/src/common/PCommon.h @@ -1,9 +1,6 @@ #ifndef __PCOMMON_H #define __PCOMMON_H -#include -#if defined(GCC_VERSION) && (GCC_VERSION >= 3003) -#include -#endif + #include #include "mut.h" #include "mlo.h" diff --git a/alliance/src/ocp/src/placer/PPlacement.cpp b/alliance/src/ocp/src/placer/PPlacement.cpp index e15434f1..c7a6ea89 100644 --- a/alliance/src/ocp/src/placer/PPlacement.cpp +++ b/alliance/src/ocp/src/placer/PPlacement.cpp @@ -1323,7 +1323,12 @@ void PPlacement::InitPlaceWithPrePlace() { // abutment box - assert(_prePlaceFig); + if (!_prePlaceFig) + { + cerr << " o ERROR: impossible to init preplacement with empty preplacement figure" << endl; + exit(1); + } + int Width = _prePlaceFig->XAB2 - _prePlaceFig->XAB1; int Height = _prePlaceFig->YAB2 - _prePlaceFig->YAB1; @@ -1521,7 +1526,11 @@ PPlacement::CreateSubRows(PRow* row, PrePlaceTab& tabpreplace, row->_subRowsXMaxInv[srymit->first] = srymit->second; } } - assert(subrowscreated == nbsubrows); + if (subrowscreated != nbsubrows) + { + cerr << " o INTERNAL ERROR : in subrow creation" << endl; + exit (1); + } } // ====================================================================== diff --git a/alliance/src/ocp/src/placer/PPlacement.h b/alliance/src/ocp/src/placer/PPlacement.h index bd75a372..0297ebdc 100644 --- a/alliance/src/ocp/src/placer/PPlacement.h +++ b/alliance/src/ocp/src/placer/PPlacement.h @@ -12,10 +12,6 @@ using namespace __gnu_cxx; // GCC 3.1 and later #endif #endif #endif -#include -#if defined(GCC_VERSION) && (GCC_VERSION >= 3003) -#include -#endif #include #include diff --git a/alliance/src/ocp/src/placer/PPlacementFinal.cpp b/alliance/src/ocp/src/placer/PPlacementFinal.cpp index 72dc42ee..0d91d376 100644 --- a/alliance/src/ocp/src/placer/PPlacementFinal.cpp +++ b/alliance/src/ocp/src/placer/PPlacementFinal.cpp @@ -147,7 +147,11 @@ PPlacement::FinalInitialize() eit != (*nit)->GetElems().end(); eit++) { - assert(!dynamic_cast(*eit)); + if (!dynamic_cast(*eit)) + { + cerr << " o INTERNAL ERROR: FinalInitialize" << endl; + exit(1); + } } } // on efface ce qui ne nous sert plus. diff --git a/alliance/src/ocp/src/placer/PRow.cpp b/alliance/src/ocp/src/placer/PRow.cpp index a88cf6e6..a93637b1 100644 --- a/alliance/src/ocp/src/placer/PRow.cpp +++ b/alliance/src/ocp/src/placer/PRow.cpp @@ -89,7 +89,11 @@ PRow::GetSubRow(const double X) if (right == _subRowsXMax.end()) { - assert(left != _subRowsXMaxInv.end()); + if (left == _subRowsXMaxInv.end()) + { + cerr << " o INTERNAL ERROR: GetSubRow()" << endl; + exit(1); + } return *_subRows[left->second]; } @@ -102,7 +106,11 @@ PRow::GetSubRow(const double X) // si il n'y a rien a gauche... if (left == _subRowsXMaxInv.end()) { - assert(right != _subRowsXMax.end()); + if (right == _subRowsXMax.end()) + { + cerr << " o INTERNAL ERROR: GetSubRow()" << endl; + exit(1); + } return *_subRows[right->second]; }