Parcourir la source

Fixed warning.

Branimir Karadžić il y a 7 ans
Parent
commit
34b0d66051
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/bgfx.cpp

+ 4 - 1
src/bgfx.cpp

@@ -4793,7 +4793,10 @@ BGFX_C_API bool bgfx_init(const bgfx_init_t* _init)
 		init.allocator = reinterpret_cast<bgfx_allocator_interface_t *>(&s_allocator);
 	}
 
-	return bgfx::init(*reinterpret_cast<const bgfx::Init*>(&init) );
+	union { const bgfx_init_t* c; const bgfx::Init* cpp; } in;
+	in.c = _init;
+
+	return bgfx::init(*in.cpp);
 }
 
 BGFX_C_API void bgfx_shutdown(void)