56 lines
2.4 KiB
Diff
56 lines
2.4 KiB
Diff
Original patch by q66, adjusted for version 2.0.0.
|
|
Fix build on systems with unsigned chars by default.
|
|
|
|
--- a/src/libs/core/music/tkeysignature.cpp 2021-06-05 13:17:35.000000000 +0200
|
|
+++ b/src/libs/core/music/tkeysignature.cpp 2021-08-14 18:58:03.380770429 +0200
|
|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
/*static*/
|
|
-const char TkeySignature::scalesDefArr[15][7] = {
|
|
+const signed char TkeySignature::scalesDefArr[15][7] = {
|
|
{-1,-1,-1,-1,-1,-1,-1}, // Cb/ab
|
|
{-1,-1,-1, 0,-1,-1,-1}, // Gb/eb
|
|
{ 0,-1,-1, 0,-1,-1,-1}, // Db/bb
|
|
@@ -43,8 +43,8 @@
|
|
{ 1, 1, 1, 1, 1, 1, 1}, // C#/a#
|
|
};
|
|
|
|
-const char TkeySignature::majorKeys[15] = { 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0 };
|
|
-const char TkeySignature::minorKeys[15] = { 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5 };
|
|
+const signed char TkeySignature::majorKeys[15] = { 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0 };
|
|
+const signed char TkeySignature::minorKeys[15] = { 5, 2, 6, 3, 0, 4, 1, 5, 2, 6, 3, 0, 4, 1, 5 };
|
|
|
|
QString TkeySignature::majorNames[15] = { QString(), QString(), QString(), QString(), QString(),
|
|
QString(), QString(), QString(), QString(), QString(),
|
|
--- a/src/libs/core/music/tkeysignature.h 2021-06-05 13:17:35.000000000 +0200
|
|
+++ b/src/libs/core/music/tkeysignature.h 2021-08-14 19:01:28.596571380 +0200
|
|
@@ -49,7 +49,7 @@
|
|
* @p scalesDefArr[7] is C-major/a-minor and has 7 times 0 (no accids).
|
|
* The order os from 7b [0] to 7# [15]
|
|
*/
|
|
- static const char scalesDefArr[15][7];
|
|
+ static const signed char scalesDefArr[15][7];
|
|
|
|
/**
|
|
* Those smart arrays keep which note in @p scalesDefArr is 1-st in key scale.
|
|
@@ -57,7 +57,7 @@
|
|
* like @p scalesDefArr[8][4] point on accid of a G note.
|
|
* This is faster way then calculate it and takes less memory.
|
|
*/
|
|
- static const char majorKeys[15], minorKeys[15];
|
|
+ static const signed char majorKeys[15], minorKeys[15];
|
|
|
|
/**
|
|
* This method fulfills majorNames and minorNames arrays
|
|
--- a/src/libs/core/music/tnote.h 2021-06-05 13:17:35.000000000 +0200
|
|
+++ b/src/libs/core/music/tnote.h 2021-08-14 18:55:34.210784018 +0200
|
|
@@ -68,7 +68,7 @@
|
|
* It can be: @li e_None = 3 @li e_Sharp = 1 @li e_DoubleSharp=2
|
|
* @li e_Flat= -1 @li e_DoubleFlat= -2 @li e_Natural=0
|
|
*/
|
|
- enum Ealter : char {
|
|
+ enum Ealter : signed char {
|
|
e_Natural = 0, e_Sharp = 1, e_DoubleSharp = 2, e_Flat = -1, e_DoubleFlat = -2, e_None = 3
|
|
};
|
|
|