From eb3a04f30e614938fbcde7bfefdfe8d5ab6b7015 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Br=C3=A6strup=20Sayoc?= Date: Sat, 16 Jul 2022 14:12:38 +0200 Subject: [PATCH] [TechDraw] Use default parameters for LineFormat constructor --- src/Mod/TechDraw/App/Cosmetic.cpp | 11 ++--------- src/Mod/TechDraw/App/Cosmetic.h | 9 ++++----- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/Mod/TechDraw/App/Cosmetic.cpp b/src/Mod/TechDraw/App/Cosmetic.cpp index 35b4cd8c73..1c994fbafd 100644 --- a/src/Mod/TechDraw/App/Cosmetic.cpp +++ b/src/Mod/TechDraw/App/Cosmetic.cpp @@ -1,5 +1,6 @@ /*************************************************************************** * Copyright (c) 2019 WandererFan * + * Copyright (c) 2022 Benjamin Bræstrup Sayoc * * * * This file is part of the FreeCAD CAx development system. * * * @@ -73,18 +74,10 @@ using namespace std; #define COSMETICEDGE 1 #define CENTERLINE 2 -LineFormat::LineFormat() -{ - m_style = getDefEdgeStyle(); - m_weight = getDefEdgeWidth(); - m_color = getDefEdgeColor(); - m_visible = true; -} - LineFormat::LineFormat(int style, double weight, App::Color color, - bool visible ) : + bool visible) : m_style(style), m_weight(weight), m_color(color), diff --git a/src/Mod/TechDraw/App/Cosmetic.h b/src/Mod/TechDraw/App/Cosmetic.h index 934896e242..f7e9b2f0a6 100644 --- a/src/Mod/TechDraw/App/Cosmetic.h +++ b/src/Mod/TechDraw/App/Cosmetic.h @@ -42,11 +42,10 @@ class DrawViewPart; class TechDrawExport LineFormat { public: - LineFormat(); - LineFormat(int style, - double weight, - App::Color color, - bool visible ); + LineFormat(int style = getDefEdgeStyle(), + double weight = getDefEdgeWidth(), + App::Color color = getDefEdgeWidth(), + bool visible = true); ~LineFormat() = default; int m_style;