Skip to content

Commit c86619c

Browse files
committed
Merge branch 'main' of https://[email protected]/AngusJohnson/Clipper2.git
2 parents fcf5607 + 065f398 commit c86619c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

CPP/Clipper2Lib/include/clipper2/clipper.core.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,20 @@ namespace Clipper2Lib
248248
template <typename T>
249249
using Paths = std::vector<Path<T>>;
250250

251+
template <typename T, typename T2=T>
252+
Path<T>& operator<<(Path<T>& poly, const Point<T2>& p)
253+
{
254+
poly.emplace_back(p);
255+
return poly;
256+
}
257+
258+
template <typename T>
259+
Paths<T>& operator<<(Paths<T>& polys, const Path<T>& p)
260+
{
261+
polys.emplace_back(p);
262+
return polys;
263+
}
264+
251265
using Path64 = Path<int64_t>;
252266
using PathD = Path<double>;
253267
using Paths64 = std::vector< Path64>;

0 commit comments

Comments
 (0)