Added "explicit" specifier to constructors that would otherwise allow undesirable implicit conversion from integer types.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This commit is contained in:
parent
2651cf9b02
commit
d47434c2ec
|
@ -55,7 +55,7 @@ namespace agg
|
|||
gray8() {}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
gray8(unsigned v_, unsigned a_=base_mask) :
|
||||
explicit gray8(unsigned v_, unsigned a_=base_mask) :
|
||||
v(int8u(v_)), a(int8u(a_)) {}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
@ -242,7 +242,7 @@ namespace agg
|
|||
gray16() {}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
gray16(unsigned v_, unsigned a_=base_mask) :
|
||||
explicit gray16(unsigned v_, unsigned a_=base_mask) :
|
||||
v(int16u(v_)), a(int16u(a_)) {}
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue