void-packages/srcpkgs/nootka/patches/signed-char.patch

50 lines
2.3 KiB
Diff

commit 17a9c38e654aa0b77c5387991cea1cd6d04c2517
Author: q66 <daniel@octaforge.org>
Date: Thu Jan 2 00:36:14 2020 +0100
fix build on systems with unsigned chars by default
diff --git src/libs/core/music/tkeysignature.cpp src/libs/core/music/tkeysignature.cpp
index 51ccf34..0024770 100644
--- src/libs/core/music/tkeysignature.cpp
+++ src/libs/core/music/tkeysignature.cpp
@@ -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 @@ const char TkeySignature::scalesDefArr[15][7] = {
{ 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(),
diff --git src/libs/core/music/tkeysignature.h src/libs/core/music/tkeysignature.h
index 6c98d66..676d3b9 100644
--- src/libs/core/music/tkeysignature.h
+++ src/libs/core/music/tkeysignature.h
@@ -43,13 +43,13 @@ public:
/** Array with definitions of each scale.
* @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.
* F.e. For G-major is @p majorKeys[8] = 4,
* 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
* appropriate keys names depends on naming style