www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit e9326924f28d4dfcaf35d691195149829642d77e
parent c8f30f064ee93dc9ae64800582a18cb9da964805
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Thu, 22 Dec 2011 15:49:05 +0100

Mise en commentaire d'un ASSERT qui faisait des accès mémoire non initialisés.

Diffstat:
Mheap.cpp | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/heap.cpp b/heap.cpp @@ -6,14 +6,14 @@ Heap::Heap() void Heap::init(int id, int factor) { this->id = id; this->factor = factor; } void Heap::insert(float key, Chose* value) { - { // DEBUG - int _d_node = value->lod.heaps[id]; - if (_d_node <= lastNode && _d_node >= 0 && - buckets[getBucket(_d_node)][getIndex(_d_node)].value == value) { - std::cout << "ERROR ! Trying to insert " << value; - std::cout << " but it is already here." << std::endl; - } - } + // { // DEBUG + // int _d_node = value->lod.heaps[id]; + // if (_d_node <= lastNode && _d_node >= 0 && + // buckets[getBucket(_d_node)][getIndex(_d_node)].value == value) { + // std::cout << "ERROR ! Trying to insert " << value; + // std::cout << " but it is already here." << std::endl; + // } + // } ++lastNode; if (getBucket(lastNode) > lastAllocatedBucket) { allocateBucket(); @@ -26,13 +26,13 @@ void Heap::insert(float key, Chose* value) { void Heap::remove(Chose* value) { int node = value->lod.heaps[id]; - { // DEBUG - if (buckets[getBucket(node)][getIndex(node)].value != value) { - std::cout << "ERROR ! Trying to remove " << value; - std::cout << " but found " << buckets[getBucket(node)][getIndex(node)].value; - std::cout << std::endl; - } - } + // { // DEBUG + // if (buckets[getBucket(node)][getIndex(node)].value != value) { + // std::cout << "ERROR ! Trying to remove " << value; + // std::cout << " but found " << buckets[getBucket(node)][getIndex(node)].value; + // std::cout << std::endl; + // } + // } if (node == lastNode) { // On a supprimé le dernier noeud. --lastNode;