Explorar el Código

Bugfix: Setting bits in the Flags wrapper would reset all previously set bits (whoops)

BearishSun hace 8 años
padre
commit
0dc69d8023
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Source/BansheeUtility/Utility/BsFlags.h

+ 1 - 1
Source/BansheeUtility/Utility/BsFlags.h

@@ -43,7 +43,7 @@ namespace bs
 		/** Activates all of the provided bits. */
 		/** Activates all of the provided bits. */
 		Flags<Enum, Storage>& set(Enum value)
 		Flags<Enum, Storage>& set(Enum value)
 		{
 		{
-			mBits = static_cast<Storage>(value);
+			mBits |= static_cast<Storage>(value);
 
 
 			return *this;
 			return *this;
 		}
 		}