www

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

commit f5cf397376564982df372ae8da0224743f13fa73
parent a726e13737c2c928bef6b1e4351d193b34d0f0ed
Author: Georges Dupéron <jahvascriptmaniac+github@free.fr>
Date:   Thu, 22 Dec 2011 12:48:43 +0100

Correction d'une erreur de compilation stupide (impossible de cast un pointeur en int…).

Diffstat:
MMakefile | 2+-
Mheap.cpp | 6+++---
2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile @@ -2,7 +2,7 @@ CXX=g++ # -ansi -pedantic -Wconversion CCWARN=-Wall -Wextra -Werror # -flto (nécessite GCC 4.5) -m32 ou -m64 -CFLAGS=-O0 -I. $(CCWARN) -g -rdynamic +CFLAGS=-O0 -I. $(CCWARN) SOURCES = $(shell echo *.cpp rules/*.cpp rules/*/*.cpp) HEADERS = $(shell echo *.hh rules/*.hh rules/*/*.hh) diff --git a/heap.cpp b/heap.cpp @@ -10,7 +10,7 @@ void Heap::insert(int key, Chose* value) { 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 " << (int)(value); + std::cout << "ERROR ! Trying to insert " << value; std::cout << " but it is already here." << std::endl; } } @@ -30,8 +30,8 @@ void Heap::remove(Chose* value) { { // DEBUG if (buckets[getBucket(node)][getIndex(node)].value != value) { - std::cout << "ERROR ! Trying to remove " << (int)(value); - std::cout << " but found " << (int)(buckets[getBucket(node)][getIndex(node)].value); + std::cout << "ERROR ! Trying to remove " << value; + std::cout << " but found " << buckets[getBucket(node)][getIndex(node)].value; std::cout << std::endl; } }