Pas d'erreur décelée mais tests partiels

This commit is contained in:
Jean Sirmai 2023-09-28 00:19:33 +02:00
parent 386b3ebd42
commit ad9829aa40
Signed by: jean
GPG Key ID: FB3115C340E057E3
1 changed files with 2 additions and 4 deletions

View File

@ -617,8 +617,6 @@ static int erase_arrow (GLuint *arrows, int arrows_nb, int address, int site, in
static int set_arrow (GLuint *arrows, int arrows_nb, int requested_weight, int site, int x, int y, int z) static int set_arrow (GLuint *arrows, int arrows_nb, int requested_weight, int site, int x, int y, int z)
{ {
// assert : no more than one arrow per address pas de doublons de flèches
// assert : arrows localization within space and sites
int address = -1, current_weight = -1; int address = -1, current_weight = -1;
for (int i = 0; i < arrows_nb; i++) { for (int i = 0; i < arrows_nb; i++) {
@ -651,7 +649,7 @@ static int set_arrow (GLuint *arrows, int arrows_nb, int requested_weight, int s
if (address >= 0 && current_weight == requested_weight) { if (address >= 0 && current_weight == requested_weight) {
printf("arrow (%d,%d,%d,%d) found at address %d; current_weight == requested_weight => END",\ printf("arrow (%d,%d,%d,%d) found at address %d; current_weight == requested_weight => END",\
arrows[address + 1], arrows[address + 2], arrows[address + 3], arrows[address + 4], address); return arrows_nb;} arrows[address + 1], arrows[address + 2], arrows[address + 3], arrows[address + 4], address/5); return arrows_nb;}
if (address == -1 && requested_weight == 0) {printf("no such arrow found && requested weight == 0 => END"); return arrows_nb;} if (address == -1 && requested_weight == 0) {printf("no such arrow found && requested weight == 0 => END"); return arrows_nb;}