summaryrefslogtreecommitdiff
path: root/media-sound/klick/files/klick-0.12.2-gcc6.patch
blob: 016d221d30e094a88ead938625520160febdd6b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
Description: Fix build with gcc-6.
Author: Jaromír Mikeš <mira.mikes@seznam.cz>
Forwarded: dominic.sacre@gmx.de

Index: klick/src/metronome_map.hh
===================================================================
--- klick.orig/src/metronome_map.hh
+++ klick/src/metronome_map.hh
@@ -48,7 +48,7 @@ class MetronomeMap
     virtual void timebase_callback(position_t *);
 
   private:
-    static double const TICKS_PER_BEAT = 1920.0;
+    static double constexpr TICKS_PER_BEAT = 1920.0;
 
     // transport position
     nframes_t _current;
Index: klick/src/metronome_simple.hh
===================================================================
--- klick.orig/src/metronome_simple.hh
+++ klick/src/metronome_simple.hh
@@ -59,8 +59,8 @@ class MetronomeSimple
   private:
 
     static int const MAX_TAPS = 5;
-    static float const MAX_TAP_AGE = 3.0;
-    static float const TAP_DIFF = 0.2;
+    static float constexpr MAX_TAP_AGE = 3.0;
+    static float constexpr TAP_DIFF = 0.2;
 
     float _tempo;
     float _tempo_increment, _tempo_start, _tempo_limit;
Index: klick/src/tempomap.cc
===================================================================
--- klick.orig/src/tempomap.cc
+++ klick/src/tempomap.cc
@@ -57,17 +57,17 @@ static char const regex_blank[] = "^[[:b
 // matches any valid line in a tempomap file
 static char const regex_valid[] =
     // label
-    "^[[:blank:]]*("REGEX_LABEL":)?" \
+    "^[[:blank:]]*(" REGEX_LABEL":)?" \
     // bars
-    "[[:blank:]]*"REGEX_INT"" \
+    "[[:blank:]]*" REGEX_INT"" \
     // meter
-    "([[:blank:]]+"REGEX_INT"/"REGEX_INT")?" \
+    "([[:blank:]]+" REGEX_INT"/" REGEX_INT")?" \
     // tempo
-    "[[:blank:]]+"REGEX_FLOAT"(-"REGEX_FLOAT"|((,"REGEX_FLOAT")*))?" \
+    "[[:blank:]]+" REGEX_FLOAT"(-" REGEX_FLOAT"|((," REGEX_FLOAT")*))?" \
     // pattern
-    "([[:blank:]]+"REGEX_PATTERN")?" \
+    "([[:blank:]]+" REGEX_PATTERN")?" \
     // volume
-    "([[:blank:]]+"REGEX_FLOAT")?" \
+    "([[:blank:]]+" REGEX_FLOAT")?" \
     // comment
     "[[:blank:]]*(#.*)?$";
 
@@ -87,13 +87,13 @@ static int const
 // matches valid tempo parameters on the command line
 static char const regex_cmdline[] =
     // bars
-    "^[[:blank:]]*("REGEX_INT"[[:blank:]]+)?" \
+    "^[[:blank:]]*(" REGEX_INT"[[:blank:]]+)?" \
     // meter
-    "("REGEX_INT"/"REGEX_INT"[[:blank:]]+)?" \
+    "(" REGEX_INT"/" REGEX_INT"[[:blank:]]+)?" \
     // tempo
-    REGEX_FLOAT"(-"REGEX_FLOAT"/"REGEX_FLOAT")?" \
+    REGEX_FLOAT"(-" REGEX_FLOAT"/" REGEX_FLOAT")?" \
     // pattern
-    "([[:blank:]]+"REGEX_PATTERN")?[[:blank:]]*$";
+    "([[:blank:]]+" REGEX_PATTERN")?[[:blank:]]*$";
 
 static int const
     RE_NMATCHES_CMD = 15,