mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-31 11:59:10 -07:00
Fix compilation under 5.20 (untested). #2109
This commit is contained in:
@@ -542,7 +542,7 @@ polynode_children_2_perl(const ClipperLib::PolyNode& node)
|
||||
{
|
||||
AV* av = newAV();
|
||||
const unsigned int len = node.ChildCount();
|
||||
av_extend(av, len-1);
|
||||
if (len > 0) av_extend(av, len-1);
|
||||
for (int i = 0; i < len; ++i) {
|
||||
av_store(av, i, polynode2perl(*node.Childs[i]));
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ SV*
|
||||
MultiPoint::to_AV() {
|
||||
const unsigned int num_points = this->points.size();
|
||||
AV* av = newAV();
|
||||
av_extend(av, num_points-1);
|
||||
if (num_points > 0) av_extend(av, num_points-1);
|
||||
for (unsigned int i = 0; i < num_points; i++) {
|
||||
av_store(av, i, perl_to_SV_ref(this->points[i]));
|
||||
}
|
||||
@@ -150,7 +150,7 @@ SV*
|
||||
MultiPoint::to_SV_pureperl() const {
|
||||
const unsigned int num_points = this->points.size();
|
||||
AV* av = newAV();
|
||||
av_extend(av, num_points-1);
|
||||
if (num_points > 0) av_extend(av, num_points-1);
|
||||
for (unsigned int i = 0; i < num_points; i++) {
|
||||
av_store(av, i, this->points[i].to_SV_pureperl());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user