Fixes for compiler errors when building the tests using Clang 15,
including:
* Use explicit cast to silence Wimplicit-int-float-conversion
warning for conversion of spin count in implementation of
glm::slerp.
* Use GLM_FORCE_MESSAGES instead of removed GLM_MESSAGES for
messages in glm/gtx/hash.hpp, avoiding Wundef warning.
* Encode en dash in URL for Gram-Schmit Process wikipedia page and
replace similar en dashes in comments with regular dashes, to
avoid Winvalid-utf8 warnings in glm/gtx/matrix_factorisation.inl.
* Replace degree sign symbol with text "degrees" to avoid
Winvalid-utf8 warnings in test/gtc/gtc_quaternion.cpp.
* When using Clang, build tests with -Wno-float-equal to silence
Wfloat-equal warning in implementation of glm::vec<L,T,Q>::equal.
* For performance tests in test/gtx/gtx_fast_trigonometry.cpp, add
statement explicitly casting result to void, to silence
Wunused-but-set-variable warnings.
* Add newline at end of test/gtx/gtx_hash.cpp to silence
Wnewline-eof warning.
* Rename namespace _1aga to agarose in test/gtx/gtx_pca.cpp to
avoid Wreserved-identifier warning.
This is a new warning in clang which will be available in clang 10
onwards
Fixes
error: implicit conversion from 'const int' to 'float' may lose precision [-Werror,-Wimplicit-int-float-conversion]
- specializes for 1, 2, 3 and 4-dimensional vector types
which are then aliased as tvec1, tvec2, tvec3 and tvec4
- requires C++11 aliases; breaks compatability with C++03
- tested on:
- clang-3.5.2, clang-3.8.0
- gcc 4.8.5, gcc 5.4.1, gcc 6.2.0
TODO:
- still uses template template parameters - most can probably be removed
- some definitions might now be de-duplicated