Commit patch to not break on spaces.
[bowtie.git] / debian / patches / gcc-4.7.patch
1 Author: gregor herrmann <gregoa@debian.org>,
2 Date: Sun, 22 Apr 2012 22:27:51 +0200
3 Bug-Closed: http://bugs.debian.org/667120
4 Description: function "reverseInPlace" is declared after the function is used
5  For more detailed information see
6    http://lists.debian.org/debian-mentors/2012/04/msg00409.html
7  and other mails in this thread.
8
9 --- bowtie-0.12.7.orig/alphabet.h
10 +++ bowtie-0.12.7/alphabet.h
11 @@ -41,6 +41,19 @@
12  /**
13   * Reverse-complement s in-place.  Ns go to Ns.
14   */
15 +
16 +/// Reverse a string in-place
17 +template <typename TStr>
18 +static inline void reverseInPlace(TStr& s) {
19 +       typedef typename Value<TStr>::Type TVal;
20 +       size_t len = length(s);
21 +       for(size_t i = 0; i < (len>>1); i++) {
22 +               TVal tmp = s[i];
23 +               s[i] = s[len-i-1];
24 +               s[len-i-1] = tmp;
25 +       }
26 +}
27 +
28  template<typename TStr>
29  static inline void reverseComplementInPlace(TStr& s, bool color) {
30         typedef typename Value<TStr>::Type TVal;
31 @@ -69,18 +82,6 @@
32         }
33  }
34  
35 -/// Reverse a string in-place
36 -template <typename TStr>
37 -static inline void reverseInPlace(TStr& s) {
38 -       typedef typename Value<TStr>::Type TVal;
39 -       size_t len = length(s);
40 -       for(size_t i = 0; i < (len>>1); i++) {
41 -               TVal tmp = s[i];
42 -               s[i] = s[len-i-1];
43 -               s[len-i-1] = tmp;
44 -       }
45 -}
46 -
47  /**
48   * Return the reverse-complement of s.
49   */