Name unnamed typedef struct {...} to fix MSVC error

Compile with latest MSVC 16.6.0 Preview Release, got error message:
> osgPlugins\x\types.h(41,20): error C7626: unnamed class used in typedef name cannot declare members other than non-static data members, member enumerations, or member classes (compiling source file ...3rdparty\OpenSceneGraph\src\osgPlugins\x\mesh.cpp)

The fix was just to give it a name, which will never be used. I picked Vector_struct, feel free to improve.
This commit is contained in:
Conrad Poelman 2020-04-09 03:19:28 -04:00 committed by Robert Osfield
parent 126623645f
commit 889325b496

View File

@ -38,7 +38,7 @@ namespace DX {
*/
// Vector
typedef struct {
typedef struct Vector_struct {
float x,y,z;
inline void normalize() {