Instead reflect the polynomial and change the shifts. Also removes the
need for explicit init.
This makes our crc more similar to its standard implementation
Run tests with -Wno-self-assign-overloaded
Some tests explicitely assign the value of the variable type to itself.
Fixes warnings such as these:
./test/common/str.h:201:9: warning: explicitly assigning value of variable of type 'Common::String' to itself [-Wself-assign-overloaded]
foo10 = foo10;
~~~~~ ^ ~~~~~
./test/common/md5.h:17:3: warning: suspicious concatenation of string literals in an array initialization; did you mean to separate the elements with a comma? [-Wstring-concatenation]
"345678901234567890"
Use `clear` instead of `release` where possible.
Both clean up the span object. They differ in that `release` returns a pointer to
the internal data and `clear` destroys the internal data.
This adds a lot more unit tests for Common::INIFile and fixes some small
problems identified during their creation. Specifically:
* addSection() did not check the validity of the section name, which meant it
was possible to create a section that could not then be operated on by the
other functions (which all check validity)
* If allowNonEnglishCharacters was set, it was possible to create a key or
section name starting with '[' or '#', or including a carriage return. This
would not read back in correctly.
* Blank section and key names were considered valid, but neither would be
read back in correctly.
* The struct documentation did not mention whitespcae handling or that comments
include the '#' and carriage return.
This might help with bug #12182 where the comment suggests there is a problem
with loading the treasure data. To make sure it loads properly, added a lot
more error checking and error messages, and created unit tests for the same.
Large flat squares should get sorted below other flat things. In U8, the
definition of large is 128x128, but in Crusader they can also be larger than
that.
This fixes the paint order of hazard tape stripes in Crusader. It may also
improve paint order for Ultima 8 which has some big flat squares larger than
128x128 too (eg, shape 165 or 318 which are 256x256).
Also added tests for flat object sorting.
../scummvm/test/cxxtest/cxxtest/ValueTraits.h:120:52: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
120 | ValueTraits( CXXTEST_NEW_CLASS n ) : _old( (CXXTEST_OLD_CLASS)n ) {} \
| ^~~~~~~~~~~~~~~~~~~~
CJK offsets were wrong compared to encodings.dat file and buffers were
read past their end.
Rewrote indexing to make it match the Python script and optimize
slightly