This PR contains changes aimed at reducing the amount of compiler warnings generated at build.
Changes have been tested on different system configurations, including Mac, Linux and Windows. In all of these environments, compilation happens successfully, and no warnings are generated during compilation.
I also added a 'MAEPARSER_RIGUROUS_BUILD' macro which enables "/WX" on Windows and "-Wall -Wextra -Werror" on Linux and Mac. On the windows side, the level of warnings reporting is not increased (/W4 or /Wall) because in those cases the compiler starts reporting warnings in boost.
Changes:
Added macro 'MAEPARSER_RIGUROUS_BUILD'.
Remove the shared_ptr from BufferData::m_data, as it is not required (m_data is never exposed to other objects).
Delete the null and copy constructors and assignment operator for StreamLoader (VS2013 issued a warning about generating the assignment).
Added defintions "/wd4275 /wd4996" to the windows build: they ignore warnings about not exposing exceptions from the std libraries in the DLL.
Use boost::dynamic_bitset::test() instead of operator[]: the operator is overloaded, and can return either a reference or a boool. Apparently, VS2013 was resolving it into the reference and issuing a casting warning.
Casting around BoolProperty and comparing to 1u: VS2013 generated warnings about casting/forcing the cast from BoolProperty into bool, and viceversa.
Turned read_exception::format() arguments line_number and column into size_t: VS2013 complained about losing precision, because they were int and size_t data was being passed into them. I also updated the formatting patterns in read_exception::format() according to this change.
Transformed a couple of 'while(true)' into 'for(;;)': VS2013 warned about conditionals always being true.
Added a virtual destructor to IndexedBlockBuffer (Mac clang warning).
Made the destructors of BufferedIndexedBlockParser and DirectIndexedBlockParser final (Mac clang warnings).
Added a workaround for int -2147483648 in MaeParserTest: apparently, there is a bug in the compiler that raises a warning about applying an unary minus to an unsigned value.
Made demo_property in UsageDemo a std::unordered_map<size_t, int>, since keys are size_t.
This PR contains changes aimed at reducing the amount of compiler warnings generated at build.
Changes have been tested on different system configurations, including Mac, Linux and Windows. In all of these environments, compilation happens successfully, and no warnings are generated during compilation.
I also added a 'MAEPARSER_RIGUROUS_BUILD' macro which enables "/WX" on Windows and "-Wall -Wextra -Werror" on Linux and Mac. On the windows side, the level of warnings reporting is not increased (/W4 or /Wall) because in those cases the compiler starts reporting warnings in boost.
Changes: