diff --git a/Base/quicksort.h b/Base/quicksort.h
index d2d031c52434135c55882faa7c37c4c642e0eb81..10a83c098997c732798c4a848291670a7983dcb3 100644
--- a/Base/quicksort.h
+++ b/Base/quicksort.h
@@ -14,16 +14,6 @@
 // Base
 #include "swap.h"
 
-template <class T>
-void quickSort(T* array, unsigned beg, unsigned end)
-{
-  if (beg < end) {
-    unsigned p = partition_(array, beg, end);
-    quickSort(array, beg, p);
-    quickSort(array, p+1, end);
-  }
-}
-
 template <class T>
 unsigned partition_(T* array, unsigned beg, unsigned end)
 {
@@ -43,6 +33,16 @@ unsigned partition_(T* array, unsigned beg, unsigned end)
   return j;
 }
 
+template <class T>
+void quickSort(T* array, unsigned beg, unsigned end)
+{
+  if (beg < end) {
+    unsigned p = partition_(array, beg, end);
+    quickSort(array, beg, p);
+    quickSort(array, p+1, end);
+  }
+}
+
 /**
  * Permutes the entries of a part of an array such that all entries that are smaller
  * than a certain value are at the beginning of the array and all entries that are