From 064d5f3fa6bc245492694026934cc4a805f3b322 Mon Sep 17 00:00:00 2001 From: Matthieu Gautier Date: Thu, 5 Mar 2020 14:05:03 +0100 Subject: [PATCH] Make the search argument constant. --- include/searcher.h | 2 +- src/searcher.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/searcher.h b/include/searcher.h index 9c0058258..2d3a58f5c 100644 --- a/include/searcher.h +++ b/include/searcher.h @@ -89,7 +89,7 @@ class Searcher * @param resultEnd the end offset of the search results (used for pagination). * @param verbose print some info on stdout if true. */ - void search(std::string& search, + void search(const std::string& search, unsigned int resultStart, unsigned int resultEnd, const bool verbose = false); diff --git a/src/searcher.cpp b/src/searcher.cpp index 6802d6635..fb5eca13d 100644 --- a/src/searcher.cpp +++ b/src/searcher.cpp @@ -97,7 +97,7 @@ Reader* Searcher::get_reader(int readerIndex) } /* Search strings in the database */ -void Searcher::search(std::string& search, +void Searcher::search(const std::string& search, unsigned int resultStart, unsigned int resultEnd, const bool verbose)