将一些可以改成引用传参的地方改成了引用
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.first = left;
|
||||||
this->strokePair.second = right ? right : std::static_pointer_cast<MaterialStyleStroke>(
|
this->strokePair.second = right ? right : std::static_pointer_cast<MaterialStyleStroke>(
|
||||||
|
@ -318,7 +318,7 @@ QWidget* FillElementLayerStyle::getListDisplayWidget() const
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
|
|
||||||
FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill fillMaterialStyle)
|
FillElementLayerStyle::FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle)
|
||||||
: fillMaterialStyle(fillMaterialStyle)
|
: fillMaterialStyle(fillMaterialStyle)
|
||||||
{
|
{
|
||||||
if (!fillMaterialStyle)
|
if (!fillMaterialStyle)
|
||||||
|
|
|
@ -83,7 +83,7 @@ public:
|
||||||
static std::unique_ptr<StrokeElementLayerStyle> fromJson(const QJsonObject& json);
|
static std::unique_ptr<StrokeElementLayerStyle> fromJson(const QJsonObject& json);
|
||||||
|
|
||||||
StrokeElementLayerStyle();
|
StrokeElementLayerStyle();
|
||||||
StrokeElementLayerStyle(PMaterialStyleStroke left, PMaterialStyleStroke right = nullptr);
|
StrokeElementLayerStyle(const PMaterialStyleStroke& left, const PMaterialStyleStroke& right = nullptr);
|
||||||
StrokeElementLayerStyle(const StrokeElementLayerStyle& other);
|
StrokeElementLayerStyle(const StrokeElementLayerStyle& other);
|
||||||
~StrokeElementLayerStyle() override = default;
|
~StrokeElementLayerStyle() override = default;
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ public:
|
||||||
STYLE_NAME("Ìî³ä", "fill")
|
STYLE_NAME("Ìî³ä", "fill")
|
||||||
static std::unique_ptr<FillElementLayerStyle> fromJson(const QJsonObject& json);
|
static std::unique_ptr<FillElementLayerStyle> fromJson(const QJsonObject& json);
|
||||||
|
|
||||||
FillElementLayerStyle(PMaterialStyleFill fillMaterialStyle = nullptr);
|
FillElementLayerStyle(const PMaterialStyleFill& fillMaterialStyle = nullptr);
|
||||||
FillElementLayerStyle(const FillElementLayerStyle& other);
|
FillElementLayerStyle(const FillElementLayerStyle& other);
|
||||||
~FillElementLayerStyle() override = default;
|
~FillElementLayerStyle() override = default;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue