Skip to content

Commit

Permalink
Declare operators of Color struct as inline functions
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-koyama committed Sep 4, 2018
1 parent e36a962 commit dbc76a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/tinycolormap.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,12 @@ namespace tinycolormap
// Implementation
//////////////////////////////////////////////////////////////////////////////////

Color operator+(const Color& c0, const Color& c1)
inline Color operator+(const Color& c0, const Color& c1)
{
return { c0[0] + c1[0], c0[1] + c1[1], c0[2] + c1[2] };
}

Color operator*(double s, const Color& c)
inline Color operator*(double s, const Color& c)
{
return { s * c[0], s * c[1], s * c[2] };
}
Expand Down

0 comments on commit dbc76a9

Please sign in to comment.