Skip to content

Commit

Permalink
class members with constexpr don't really work out on some old compilers
Browse files Browse the repository at this point in the history
- e.g., VS2015 and VS2013
  • Loading branch information
chchwy committed Mar 8, 2022
1 parent de0a5c8 commit 34940a0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 8 additions & 0 deletions core_lib/src/overlaypainter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@
#include "pencildef.h"


Q_CONSTEXPR static int OVERLAY_SAFE_CENTER_CROSS_SIZE = 25;
Q_CONSTEXPR static qreal LINELENGTHFACTOR = 2.0;
Q_CONSTEXPR static int LR_DIFF = 10; // minimum difference for Left and Right point
Q_CONSTEXPR static int MID_DIFF = 2; // minimum difference for Middle point
Q_CONSTEXPR static int LEFTANGLEOFFSET = 90;
Q_CONSTEXPR static int RIGHTANGLEOFFSET = -90;


void initPerspectivePainter(QPainter& painter)
{
painter.setCompositionMode(QPainter::CompositionMode_Difference);
Expand Down
7 changes: 0 additions & 7 deletions core_lib/src/overlaypainter.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ class OverlayPainter
MoveMode mMoveMode = MoveMode::NONE;

QTransform mViewTransform;

Q_CONSTEXPR static int OVERLAY_SAFE_CENTER_CROSS_SIZE = 25;
Q_CONSTEXPR static qreal LINELENGTHFACTOR = 2.0;
Q_CONSTEXPR static int LR_DIFF = 10; // minimum difference for Left and Right point
Q_CONSTEXPR static int MID_DIFF = 2; // minimum difference for Middle point
Q_CONSTEXPR static int LEFTANGLEOFFSET = 90;
Q_CONSTEXPR static int RIGHTANGLEOFFSET = -90;
};

#endif // OVERLAYPAINTER_H

0 comments on commit 34940a0

Please sign in to comment.