Skip to content

Commit

Permalink
Add const keyword to CrossSection::Compose parameter (#1129)
Browse files Browse the repository at this point in the history
* Add const keyword to CrossSection::Compose parameter

* Fix code formatting
  • Loading branch information
tomasf authored Dec 30, 2024
1 parent 1b3dbc2 commit ae813dd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/manifold/cross_section.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class CrossSection {
*/
///@{
std::vector<CrossSection> Decompose() const;
static CrossSection Compose(std::vector<CrossSection>&);
static CrossSection Compose(const std::vector<CrossSection>&);
static CrossSection Square(const vec2 dims, bool center = false);
static CrossSection Circle(double radius, int circularSegments = 0);
///@}
Expand Down
3 changes: 2 additions & 1 deletion src/cross_section/cross_section.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ CrossSection& CrossSection::operator^=(const CrossSection& Q) {
* Construct a CrossSection from a vector of other CrossSections (batch
* boolean union).
*/
CrossSection CrossSection::Compose(std::vector<CrossSection>& crossSections) {
CrossSection CrossSection::Compose(
const std::vector<CrossSection>& crossSections) {
return BatchBoolean(crossSections, OpType::Add);
}

Expand Down

0 comments on commit ae813dd

Please sign in to comment.