summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/BHeap.cc2
-rw-r--r--lib/BinHeap.cc5
-rw-r--r--lib/FHeap.cc2
-rw-r--r--lib/PCommon.cc4
-rw-r--r--lib/PLList.cc2
-rw-r--r--po/PriorityLists.pot4
6 files changed, 9 insertions, 10 deletions
diff --git a/lib/BHeap.cc b/lib/BHeap.cc
index aaec87a..7d7caf5 100644
--- a/lib/BHeap.cc
+++ b/lib/BHeap.cc
@@ -323,7 +323,7 @@ PriorityList *BHeap::Union(PriorityList * P)
{
BHeap *x, *Before, *After;
- if ((P->GetType()) != (((PriorityList *) this)->GetType()))
+ if ((P->GetType()) != GetType())
return GenericUnion(P);
Merge((BHeap *) P);
diff --git a/lib/BinHeap.cc b/lib/BinHeap.cc
index b57a31d..bb58141 100644
--- a/lib/BinHeap.cc
+++ b/lib/BinHeap.cc
@@ -66,10 +66,11 @@ bool BinHeap::Lower_Key(Cell x, Key_t NKey)
return true;
}
-BinHeap::BinHeap(void):FP(new CList)
+BinHeap::BinHeap(void) : FP(new CList)
{
Key = 0;
Datas = NULL;
+ type = T_BINHEAP;
}
BinHeap::~BinHeap(void)
@@ -80,7 +81,6 @@ BinHeap::~BinHeap(void)
Key_t BinHeap::ReadKey(Cell C)
{
- cerr << "Lecture de " << C << endl;
return ((binheap_t *) FP->ReadDatas(C))->Key;
}
@@ -143,7 +143,6 @@ Cell BinHeap::Insert(Key_t IKey, Datas_t const &IDatas)
binheap[i - 1] = newcell;
r = binheap[i - 1].FP = FP->Insert(0, &(binheap[i - 1]));
- cerr << "Ajout de " << r << endl;
return r;
}
diff --git a/lib/FHeap.cc b/lib/FHeap.cc
index a10e089..17ed0b5 100644
--- a/lib/FHeap.cc
+++ b/lib/FHeap.cc
@@ -238,7 +238,7 @@ PriorityList *FHeap::Union(PriorityList * P)
{
FHeap *Temp, *T = ((FHeap *) P);
- if ((P->GetType()) != (((PriorityList *) P)->GetType()))
+ if (GetType() != (P->GetType()))
return GenericUnion(P);
/* Cette fonction ne suit pas du tout l'idée du Cormen. Elle va
diff --git a/lib/PCommon.cc b/lib/PCommon.cc
index 1dc3127..16a8a3f 100644
--- a/lib/PCommon.cc
+++ b/lib/PCommon.cc
@@ -8,7 +8,7 @@
* les files de priorités. Il s'agit de la classe "Père" dont héritent
* toutes les autres files de priorités. Nous ne trouverons ici que
* les constructeurs nécessaires pour la bonne opération sur les files,
- * ainsi que les deux routines génériques n est GenericUnion.
+ * ainsi que les deux routines génériques n et GenericUnion.
*
*/
@@ -45,7 +45,7 @@ PriorityList *PriorityList::GenericUnion(PriorityList * P)
{
Key_t IKey;
Datas_t IDatas;
-
+
while (!(P->IsEmpty())) {
IKey = P->Extract_Min(IDatas);
Insert(IKey, IDatas);
diff --git a/lib/PLList.cc b/lib/PLList.cc
index 77bf2e7..b74d7d3 100644
--- a/lib/PLList.cc
+++ b/lib/PLList.cc
@@ -22,7 +22,7 @@
PriorityList *PLList::Union(PriorityList * P)
{
- if ((P->GetType()) != (((PriorityList *) this)->GetType())) {
+ if ((P->GetType()) != GetType()) {
return GenericUnion(P);
} else {
CList *x, *y, *t;
diff --git a/po/PriorityLists.pot b/po/PriorityLists.pot
index 8de0386..6b1a91c 100644
--- a/po/PriorityLists.pot
+++ b/po/PriorityLists.pot
@@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-03-21 10:24+0100\n"
+"POT-Creation-Date: 2001-03-21 12:12+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -433,7 +433,7 @@ msgstr ""
msgid "Not enough memory"
msgstr ""
-#: lib/BinHeap.cc:162
+#: lib/BinHeap.cc:161
msgid "negative overflow"
msgstr ""