Skip to content

error C2440 when giving Paths<float> to the argument of ScalePaths #739

@tkhisak

Description

@tkhisak

In order to be able to define float type Path types, etc., I request the following modifications.
(Currently, compilation fails due to the error (C2440) that the Rect<float> type cannot be converted to the Rect<double> type in the following part.)
I appreciate it if you would consider it.

9d6a1b4535c467fa29e3d2d83586ce71286bdc51

*** clipper.core-9d6a1b45.000.h
--- Clipper2/CPP/Clipper2Lib/include/clipper2/clipper.core.h
***************
*** 471,477 ****
      if constexpr (std::numeric_limits<T1>::is_integer &&
        !std::numeric_limits<T2>::is_integer)
      {
!       RectD r = GetBounds(paths);
        if ((r.left * scale_x) < min_coord ||
          (r.right * scale_x) > max_coord ||
          (r.top * scale_y) < min_coord ||
--- 471,477 ----
      if constexpr (std::numeric_limits<T1>::is_integer &&
        !std::numeric_limits<T2>::is_integer)
      {
!       Rect<T2> r = GetBounds(paths);
        if ((r.left * scale_x) < min_coord ||
          (r.right * scale_x) > max_coord ||
          (r.top * scale_y) < min_coord ||

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions