use c++ style casts
This commit is contained in:
parent
f90f6d83c6
commit
aa8c543744
2 changed files with 2 additions and 2 deletions
|
@ -165,7 +165,7 @@ public:
|
|||
|
||||
void set_default_mode(colorizer_mode mode)
|
||||
{
|
||||
default_mode_ = (mode == COLORIZER_INHERIT) ? COLORIZER_LINEAR:(colorizer_mode_enum)mode;
|
||||
default_mode_ = (mode == COLORIZER_INHERIT) ? COLORIZER_LINEAR : static_cast<colorizer_mode_enum>(mode);
|
||||
}
|
||||
|
||||
void set_default_mode_enum(colorizer_mode_enum mode) { set_default_mode(mode); }
|
||||
|
|
|
@ -41,7 +41,7 @@ struct weighted_vertex : private util::noncopyable
|
|||
vertex2d const& A = prev->coord;
|
||||
vertex2d const& B = next->coord;
|
||||
vertex2d const& C = coord;
|
||||
return std::abs((double)((A.x - C.x) * (B.y - A.y) - (A.x - B.x) * (C.y - A.y))) / 2.0;
|
||||
return std::abs(static_cast<double>((A.x - C.x) * (B.y - A.y) - (A.x - B.x) * (C.y - A.y))) / 2.0;
|
||||
}
|
||||
|
||||
struct ascending_sort
|
||||
|
|
Loading…
Reference in a new issue