You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently with modern compilers, using the API of this library can generate a lot of warnings, or useless conversions simply because the API is not consistent about signedness of its integers...
To give a single example, in Tmx::MapTile, id is unsigned but in Tmx::Tileset::GetTile, the argument is a signed integer.
I really thing that most interfaces should be changed to unsigned to avoid conversions on std::vector indexing, and restore internal consistency.
This may cause compatibility issues, so I think we should keep the old versions but mark them deprecated and remove them at next major version. This may prevent some changes inside public members.
If there is more problem in the API, we could also directly work on a next version release and rework API even more in the process.
In either case, this issue requires some amount of manual work to list all the misuses of signed int, and classify them correctly. However, compiler warnings on signed to unsigned conversion can help a lot to speed up the process.
The text was updated successfully, but these errors were encountered:
Currently with modern compilers, using the API of this library can generate a lot of warnings, or useless conversions simply because the API is not consistent about signedness of its integers...
To give a single example, in Tmx::MapTile, id is unsigned but in Tmx::Tileset::GetTile, the argument is a signed integer.
I really thing that most interfaces should be changed to unsigned to avoid conversions on std::vector indexing, and restore internal consistency.
This may cause compatibility issues, so I think we should keep the old versions but mark them deprecated and remove them at next major version. This may prevent some changes inside public members.
If there is more problem in the API, we could also directly work on a next version release and rework API even more in the process.
In either case, this issue requires some amount of manual work to list all the misuses of signed int, and classify them correctly. However, compiler warnings on signed to unsigned conversion can help a lot to speed up the process.
The text was updated successfully, but these errors were encountered: