From 222c75a65b2430953e80aa2f5ce2c5df0b5a8d61 Mon Sep 17 00:00:00 2001
From: Leon Styhre <leon@leonstyhre.com>
Date: Thu, 4 Feb 2021 23:54:04 +0100
Subject: [PATCH] Fixed an issue where filter indices couldn't be reset.

---
 es-app/src/FileFilterIndex.cpp | 2 +-
 es-app/src/FileFilterIndex.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/es-app/src/FileFilterIndex.cpp b/es-app/src/FileFilterIndex.cpp
index 4f93cc079..8d4b53688 100644
--- a/es-app/src/FileFilterIndex.cpp
+++ b/es-app/src/FileFilterIndex.cpp
@@ -618,7 +618,7 @@ void FileFilterIndex::manageIndexEntry(std::map<std::string, int>* index,
     }
 }
 
-void FileFilterIndex::clearIndex(std::map<std::string, int> indexMap)
+void FileFilterIndex::clearIndex(std::map<std::string, int>& indexMap)
 {
     indexMap.clear();
 }
diff --git a/es-app/src/FileFilterIndex.h b/es-app/src/FileFilterIndex.h
index 6045a27c7..f7c081edb 100644
--- a/es-app/src/FileFilterIndex.h
+++ b/es-app/src/FileFilterIndex.h
@@ -81,7 +81,7 @@ private:
 
     void manageIndexEntry(std::map<std::string, int>* index, std::string key, bool remove);
 
-    void clearIndex(std::map<std::string, int> indexMap);
+    void clearIndex(std::map<std::string, int>& indexMap);
 
     std::string mTextFilter;
     bool mFilterByText;