edoren / STP

SFML TMX Parser -
edoren.github.io/STP
Other
30 stars 13 forks source link

No more warning 'unused variable' #12

Closed richelbilderbeek closed 8 years ago

richelbilderbeek commented 8 years ago

When compiling with GCC with -Weffc++ the warning unused variable pops up. I fixed this by commenting out the variable name, so you can still see it.

richelbilderbeek commented 8 years ago

I also added a test for issue 13. It uses the example files from Tiled.

To run the test, just do:

cd tests
./test_stp.sh

I have added some asserts to detect where things go wrong. The assert prevents a segmentation fault when a member function of an uninitialized pointer is called.

But why that pointer remains uninitialized, I have no idea.

I hope you can help me/us out.

richelbilderbeek commented 8 years ago

Note that there is a similar Pull Request when using sfml-tmxloader here

edoren commented 8 years ago

Fixed in https://github.com/edoren/STP/commit/857badc56346a4d1e19b0c36d1b8c2e41fdd9ee6, refer to https://github.com/edoren/STP/issues/13#issuecomment-219262804 for more information.