freebsd-ports/games/critterding/files/patch-src_brainz_brainz.cpp
Raphael Kubo da Costa b23371a285 Add patch to fix a wrong assignment in the code.
In addition to fixing an actual bug, this also allows the port to build with
GCC 6:

brainz.cpp: In member function 'void Brainz::processTillAnswer()':
brainz.cpp:140:24: error: cannot convert 'bool' to 'bool*' in assignment
    Outputs[i].output = false;

PR:		219287
Approved by:	maintainer timeout (amdmi3, 16 days)
MFH:		2017Q3
2017-08-13 11:04:07 +00:00

14 lines
509 B
C++

brainz.cpp: In member function 'void Brainz::processTillAnswer()':
brainz.cpp:140:24: error: cannot convert 'bool' to 'bool*' in assignment
Outputs[i].output = false;
--- src/brainz/brainz.cpp.orig 2017-07-28 12:12:16 UTC
+++ src/brainz/brainz.cpp
@@ -137,7 +137,7 @@ Brainz::Brainz()
// clear Motor Outputs
for ( unsigned int i=0; i < numberOfOutputs; i++ )
- Outputs[i].output = false;
+ *Outputs[i].output = false;
// clear Neurons
for ( unsigned int i=0; i < totalNeurons; i++ )