From 655f97870653bee8d1badc51113936ab04b6251f Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Tue, 22 Nov 2022 12:17:48 +0200 Subject: [PATCH] error: inline variables are only available with -std=c++1z or -std=gnu++1z. --- src/libs/vlayout/vlayout.pri | 3 ++- src/libs/vlayout/vsapoint.cpp | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 src/libs/vlayout/vsapoint.cpp diff --git a/src/libs/vlayout/vlayout.pri b/src/libs/vlayout/vlayout.pri index 2f246706f..89ddbb039 100644 --- a/src/libs/vlayout/vlayout.pri +++ b/src/libs/vlayout/vlayout.pri @@ -41,7 +41,8 @@ SOURCES += \ $$PWD/vbestsquare.cpp \ $$PWD/vlayoutpoint.cpp \ $$PWD/vposition.cpp \ - $$PWD/vrawlayout.cpp \ + $$PWD/vrawlayout.cpp \ + $$PWD/vsapoint.cpp \ $$PWD/vprintlayout.cpp \ $$PWD/vtextmanager.cpp \ $$PWD/vposter.cpp \ diff --git a/src/libs/vlayout/vsapoint.cpp b/src/libs/vlayout/vsapoint.cpp new file mode 100644 index 000000000..d00ff1320 --- /dev/null +++ b/src/libs/vlayout/vsapoint.cpp @@ -0,0 +1,37 @@ +/************************************************************************ + ** + ** @file vsapoint.cpp + ** @author Roman Telezhynskyi + ** @date 22 11, 2022 + ** + ** @brief + ** @copyright + ** This source code is part of the Valentina project, a pattern making + ** program, whose allow create and modeling patterns of clothing. + ** Copyright (C) 2022 Valentina project + ** All Rights Reserved. + ** + ** Valentina is free software: you can redistribute it and/or modify + ** it under the terms of the GNU General Public License as published by + ** the Free Software Foundation, either version 3 of the License, or + ** (at your option) any later version. + ** + ** Valentina is distributed in the hope that it will be useful, + ** but WITHOUT ANY WARRANTY; without even the implied warranty of + ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + ** GNU General Public License for more details. + ** + ** You should have received a copy of the GNU General Public License + ** along with Valentina. If not, see . + ** + *************************************************************************/ + + +// See https://stackoverflow.com/a/46719572/3045403 +#if __cplusplus < 201703L +#include "vsapoint.h" + +constexpr qreal VSAPoint::passmarkFactor; // NOLINT(readability-redundant-declaration) +constexpr qreal VSAPoint::maxPassmarkLength; // NOLINT(readability-redundant-declaration) +constexpr qreal VSAPoint::minSAWidth; // NOLINT(readability-redundant-declaration) +#endif