apply some code analyzer recommendations

This commit is contained in:
2024-11-20 20:02:09 +03:00
parent 1becca7519
commit 04b40d367c
9 changed files with 25 additions and 33 deletions

View File

@@ -5,23 +5,15 @@
// GraphicType
GraphicType::GraphicType(QString name_, QColor color, Qt::PenStyle style, double width, bool visible_) {
GraphicType::GraphicType(QString name_, QColor color, Qt::PenStyle style, double width, bool visible_): name(name_), visible(visible_) {
pen.setColor(color);
pen.setStyle(style);
lines = true;
points = false;
fill = false;
fill_color = Qt::yellow;
if (qRound(width) == width)
pen.setWidth(qRound(width));
else
pen.setWidthF(width);
pen.setWidth(1);
pen.setCosmetic(true);
max_x = 0.;
name = name_;
visible = visible_;
pointWidth = 2.;
}