diff --git a/ArchitectureColoredPainting/src/Editor/LayerStyle.cpp b/ArchitectureColoredPainting/src/Editor/LayerStyle.cpp index c57ea2f..7240d46 100644 --- a/ArchitectureColoredPainting/src/Editor/LayerStyle.cpp +++ b/ArchitectureColoredPainting/src/Editor/LayerStyle.cpp @@ -254,7 +254,7 @@ StrokeElementLayerStyle::StrokeElementLayerStyle() } -StrokeElementLayerStyle::StrokeElementLayerStyle(PMaterialStyleStroke left, PMaterialStyleStroke right) +StrokeElementLayerStyle::StrokeElementLayerStyle(const PMaterialStyleStroke& left, const PMaterialStyleStroke& right) { this->strokePair.first = left; this->strokePair.second = right ? right : std::static_pointer_cast( @@ -318,7 +318,7 @@ QWidget* FillElementLayerStyle::getListDisplayWidget() const return w; } -FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill fillMaterialStyle) +FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle) : fillMaterialStyle(fillMaterialStyle) { if (!fillMaterialStyle) diff --git a/ArchitectureColoredPainting/src/Editor/LayerStyle.h b/ArchitectureColoredPainting/src/Editor/LayerStyle.h index 6db22d6..3d9b023 100644 --- a/ArchitectureColoredPainting/src/Editor/LayerStyle.h +++ b/ArchitectureColoredPainting/src/Editor/LayerStyle.h @@ -83,7 +83,7 @@ public: static std::unique_ptr fromJson(const QJsonObject& json); StrokeElementLayerStyle(); - StrokeElementLayerStyle(PMaterialStyleStroke left, PMaterialStyleStroke right = nullptr); + StrokeElementLayerStyle(const PMaterialStyleStroke& left, const PMaterialStyleStroke& right = nullptr); StrokeElementLayerStyle(const StrokeElementLayerStyle& other); ~StrokeElementLayerStyle() override = default; @@ -105,7 +105,7 @@ public: STYLE_NAME("Ìî³ä", "fill") static std::unique_ptr fromJson(const QJsonObject& json); - FillElementLayerStyle(PMaterialStyleFill fillMaterialStyle = nullptr); + FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle = nullptr); FillElementLayerStyle(const FillElementLayerStyle& other); ~FillElementLayerStyle() override = default;