clang-tidy: readability-non-const-parameter (2/2)
[alexxy/gromacs.git] / src / gromacs / gmxana / binsearch.cpp
index d30d16bc72087abfa2bee548e8453b12a88d6d40..b9b9b93a81b9e4dce9caa83b90b5716ec84b6791 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2010,2011,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2010,2011,2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -109,7 +109,7 @@ void insertionSort(real *arr, int *perm, int startndx, int endndx, int direction
 }
 
 
-int BinarySearch (real *array, int low, int high, real key, int direction)
+int BinarySearch (const real *array, int low, int high, real key, int direction)
 {
     int iMid, iMax, iMin;
     iMax = high+2;
@@ -159,7 +159,7 @@ int start_binsearch(real *array, int *perm, int low, int high,
     return BinarySearch(array, low, high, key, direction);
 }
 
-int LinearSearch (double *array, int startindx, int stopindx,
+int LinearSearch (const double *array, int startindx, int stopindx,
                   double key, int *count, int direction)
 {
     /*Iterative implementation - assume elements sorted*/