ccstruct: Fix compiler warning (disable buggy code)

gcc reports a potential bad array access:

ccstruct/mod128.cpp:98:20: warning:
 array subscript has type 'char' [-Wchar-subscripts]

dir is of type 'char'. Most compilers use signed char by default.
Then the value of dir is in the range -128 ... 127 and cannot be
used to access an array with 256 elements.

Don't fix that but disable the buggy code.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
Stefan Weil 2015-11-05 06:35:14 +01:00
parent 997c4a6078
commit 70fd7cdf0a

View File

@ -94,6 +94,8 @@ DIR128::DIR128( //from fcoord
* Convert a direction to a vector.
**********************************************************************/
#if 0 // code is buggy for negative dir and unused
ICOORD DIR128::vector() const { //convert to vector
return dirtab[dir]; //easy really
}
#endif