Skip to content

Commit bbb9f5d

Browse files
authored
Merge pull request #1714 from joto/geom-move-num-geometries-func
num_geometries() belongs in linestring_t, not needed for ring_t
2 parents 6d8a3e3 + e2a6820 commit bbb9f5d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/geom.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@ class point_list_t : public std::vector<point_t>
105105
: std::vector<point_t>(list.begin(), list.end())
106106
{}
107107

108-
[[nodiscard]] constexpr static std::size_t num_geometries() noexcept
109-
{
110-
return 1;
111-
}
112-
113108
friend bool operator==(point_list_t const &a,
114109
point_list_t const &b) noexcept;
115110

@@ -123,6 +118,11 @@ class linestring_t : public point_list_t
123118
public:
124119
using point_list_t::point_list_t;
125120

121+
[[nodiscard]] constexpr static std::size_t num_geometries() noexcept
122+
{
123+
return 1;
124+
}
125+
126126
}; // class linestring_t
127127

128128
class ring_t : public point_list_t

0 commit comments

Comments
 (0)