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

This commit is contained in:
Georges Dupéron 2011-12-22 12:48:43 +01:00
parent a726e13737
commit f5cf397376
2 changed files with 4 additions and 4 deletions

View File

@ -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)

View File

@ -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;
}
}