Browse Source

Update contributor list. Remove unnecessary casts.

Eugene Kozlov 8 years ago
parent
commit
2711d7b73f
2 changed files with 5 additions and 4 deletions
  1. 1 0
      README.md
  2. 4 4
      Source/Urho3D/Math/Color.cpp

+ 1 - 0
README.md

@@ -129,6 +129,7 @@ Urho3D development, contributions and bugfixes by:
 - fredakilla
 - gleblebedev
 - hdunderscore
+- hsnabn
 - lhinuz
 - lvshiling
 - marynate

+ 4 - 4
Source/Urho3D/Math/Color.cpp

@@ -66,10 +66,10 @@ Vector3 Color::ToHSV() const
 
 void Color::FromUInt(unsigned color)
 {
-    a_ = (float)(((color >> 24) & 0xff) / 255.0f);
-    b_ = (float)(((color >> 16) & 0xff) / 255.0f);
-    g_ = (float)(((color >> 8)  & 0xff) / 255.0f);
-    r_ = (float)(((color >> 0)  & 0xff) / 255.0f);
+    a_ = ((color >> 24) & 0xff) / 255.0f;
+    b_ = ((color >> 16) & 0xff) / 255.0f;
+    g_ = ((color >> 8)  & 0xff) / 255.0f;
+    r_ = ((color >> 0)  & 0xff) / 255.0f;
 }
 
 void Color::FromHSL(float h, float s, float l, float a)