2
0
Эх сурвалжийг харах

Fix warning about copying vtable

- Set the value explicitly. We already assume that it's
  a Color object so we might as well use it like an object.
Nur Monson 12 жил өмнө
parent
commit
a5c7f2947f

+ 1 - 1
Core/Contents/Include/PolyShader.h

@@ -142,7 +142,7 @@ namespace Polycode {
 		void setNumber(Number x)   { memcpy(data, &x, sizeof(x)); }
 		void setNumber(Number x)   { memcpy(data, &x, sizeof(x)); }
 		void setVector2(Vector2 x) { memcpy(data, &x, sizeof(x)); }
 		void setVector2(Vector2 x) { memcpy(data, &x, sizeof(x)); }
 		void setVector3(Vector3 x) { memcpy(data, &x, sizeof(x)); }
 		void setVector3(Vector3 x) { memcpy(data, &x, sizeof(x)); }
-		void setColor(Color x)     { memcpy(data, &x, sizeof(x)); }
+		void setColor(Color x)     { static_cast<Color*>(data)->setColor(&x); }
 	};	
 	};	
 	
 	
 	class RenderTargetBinding : public PolyBase {
 	class RenderTargetBinding : public PolyBase {