Imported Debian patch 0.12.7-3
[bowtie.git] / debian / patches / gcc-4.7.patch
diff --git a/debian/patches/gcc-4.7.patch b/debian/patches/gcc-4.7.patch
new file mode 100644 (file)
index 0000000..adcb91d
--- /dev/null
@@ -0,0 +1,49 @@
+Author: gregor herrmann <gregoa@debian.org>,
+Date: Sun, 22 Apr 2012 22:27:51 +0200
+Bug-Closed: http://bugs.debian.org/667120
+Description: function "reverseInPlace" is declared after the function is used
+ For more detailed information see
+   http://lists.debian.org/debian-mentors/2012/04/msg00409.html
+ and other mails in this thread.
+
+--- bowtie-0.12.7.orig/alphabet.h
++++ bowtie-0.12.7/alphabet.h
+@@ -41,6 +41,19 @@
+ /**
+  * Reverse-complement s in-place.  Ns go to Ns.
+  */
++
++/// Reverse a string in-place
++template <typename TStr>
++static inline void reverseInPlace(TStr& s) {
++      typedef typename Value<TStr>::Type TVal;
++      size_t len = length(s);
++      for(size_t i = 0; i < (len>>1); i++) {
++              TVal tmp = s[i];
++              s[i] = s[len-i-1];
++              s[len-i-1] = tmp;
++      }
++}
++
+ template<typename TStr>
+ static inline void reverseComplementInPlace(TStr& s, bool color) {
+       typedef typename Value<TStr>::Type TVal;
+@@ -69,18 +82,6 @@
+       }
+ }
+-/// Reverse a string in-place
+-template <typename TStr>
+-static inline void reverseInPlace(TStr& s) {
+-      typedef typename Value<TStr>::Type TVal;
+-      size_t len = length(s);
+-      for(size_t i = 0; i < (len>>1); i++) {
+-              TVal tmp = s[i];
+-              s[i] = s[len-i-1];
+-              s[len-i-1] = tmp;
+-      }
+-}
+-
+ /**
+  * Return the reverse-complement of s.
+  */