Skip to content

Commit

Permalink
fix: char can be signed or unsigned depending on platform, make it ex…
Browse files Browse the repository at this point in the history
…plicit

chars can be signed or unsigned by default, as we expect signed here, make it
explicit.

Fixes error on arm64:

./../vtools/dialogs/tools/dialogtool.h:100:45: error: enumerator value ‘-7’ is outside the range of underlying type ‘char’
  100 | enum class DialogPosition : char {Offset = -7, BottomRight, BottomLeft, Center, TopRight, TopLeft};
      |
  • Loading branch information
csett86 committed Sep 3, 2024
1 parent 1700ea1 commit 67717b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/vtools/dialogs/tools/dialogtool.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class QPlainTextEdit;
class VAbstractTool;

enum class FillComboBox : char {Whole, NoChildren};
enum class DialogPosition : char {Offset = -7, BottomRight, BottomLeft, Center, TopRight, TopLeft};
enum class DialogPosition : signed char {Offset = -7, BottomRight, BottomLeft, Center, TopRight, TopLeft};

/**
* @brief The DialogTool class parent for all dialog of tools.
Expand Down

0 comments on commit 67717b4

Please sign in to comment.