Просмотр исходного кода

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 лет назад
Родитель
Сommit
a5c7f2947f
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Core/Contents/Include/PolyShader.h

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

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