From a311895a35ac362f76189e0b083aad99b6831c94 Mon Sep 17 00:00:00 2001 From: q66 Date: Thu, 2 Jan 2020 00:36:53 +0100 Subject: [PATCH] nootka: fix build on platforms with unsigned char (e.g. ppc) --- srcpkgs/nootka/patches/signed-char.patch | 50 ++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 srcpkgs/nootka/patches/signed-char.patch diff --git a/srcpkgs/nootka/patches/signed-char.patch b/srcpkgs/nootka/patches/signed-char.patch new file mode 100644 index 00000000000..c61c13a02fc --- /dev/null +++ b/srcpkgs/nootka/patches/signed-char.patch @@ -0,0 +1,50 @@ +commit 17a9c38e654aa0b77c5387991cea1cd6d04c2517 +Author: q66 +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