SSBMTonberry / tileson

A modern and helpful cross-platform json-parser for C++, used for parsing Tiled maps.
BSD 2-Clause "Simplified" License
189 stars 29 forks source link

Add stricter compile flags when building tests #86

Closed SSBMTonberry closed 1 year ago

SSBMTonberry commented 1 year ago

To make Tileson more clean and less error prone, the flags -Wall -Wextra -Werror should be added to the test build, to make CI a stricter process. This will be done after the CI is fixed and a proper MAC build using Clang is implemented.

See #84 for the discussion.

Big thanks to @dmlary for the suggestion :slightly_smiling_face:

SSBMTonberry commented 1 year ago

@dmlary : I've fixed the CI now, so feel free to look into this if you want. :slightly_smiling_face: That is:

If you reply, I think I may be able to assign this task directly to you :smile:

dmlary commented 1 year ago

Question: tests/tson_files_mapper.h and tests/tson_files.h are effectively the same contents, one mapping to the other, are both needed?

The MSVC compiler errors will take a bit longer to sort out.

SSBMTonberry commented 1 year ago

Question: tests/tson_files_mapper.h and tests/tson_files.h are effectively the same contents, one mapping to the other, are both needed?

The MSVC compiler errors will take a bit longer to sort out.

Yes, they are both needed. The reason why tson_files_mapper.h exists is that tson_files.h gets way too heavy for the IDE to parse when you have a lot of files there, and will eventually break autocomplete/intellisense. By referring to the mapper, which only points to the variable containing all the bytes, that problem is no issue. These files are generated by f2src which is a program for making files in-memory.