Skip to content

Commit

Permalink
Added "explicit" specifier to constructors that would otherwise allow…
Browse files Browse the repository at this point in the history
… undesirable implicit conversion from integer types.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
  • Loading branch information
4A696D authored and waddlesplash committed Mar 8, 2017
1 parent 2651cf9 commit d47434c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions headers/libs/agg/agg_color_gray.h
Expand Up @@ -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_)) {}

//--------------------------------------------------------------------
Expand Down Expand Up @@ -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_)) {}

//--------------------------------------------------------------------
Expand Down

0 comments on commit d47434c

Please sign in to comment.