将一些可以改成引用传参的地方改成了引用
parent
47ada04c3a
commit
adb28a67e8
|
@ -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<MaterialStyleStroke>(
|
||||
|
@ -318,7 +318,7 @@ QWidget* FillElementLayerStyle::getListDisplayWidget() const
|
|||
return w;
|
||||
}
|
||||
|
||||
FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill fillMaterialStyle)
|
||||
FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle)
|
||||
: fillMaterialStyle(fillMaterialStyle)
|
||||
{
|
||||
if (!fillMaterialStyle)
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
static std::unique_ptr<StrokeElementLayerStyle> 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<FillElementLayerStyle> fromJson(const QJsonObject& json);
|
||||
|
||||
FillElementLayerStyle(PMaterialStyleFill fillMaterialStyle = nullptr);
|
||||
FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle = nullptr);
|
||||
FillElementLayerStyle(const FillElementLayerStyle& other);
|
||||
~FillElementLayerStyle() override = default;
|
||||
|
||||
|
|
Loading…
Reference in New Issue