1
0
Fork 0
forked from suyu/suyu

game_list: Make ContainsAllWords an internally linked non-member function

This function actually depends on no internal class state, so it doesn't
even need to be a part of the class interface.
This commit is contained in:
Lioncash 2018-07-18 16:52:12 -04:00
parent 3d1e8f750c
commit d17e172d92
2 changed files with 1 additions and 2 deletions

View file

@ -138,7 +138,7 @@ GameList::SearchField::SearchField(GameList* parent) : QWidget{parent} {
* @param userinput String containing all words getting checked * @param userinput String containing all words getting checked
* @return true if the haystack contains all words of userinput * @return true if the haystack contains all words of userinput
*/ */
bool GameList::ContainsAllWords(const QString& haystack, const QString& userinput) const { static bool ContainsAllWords(const QString& haystack, const QString& userinput) {
const QStringList userinput_split = const QStringList userinput_split =
userinput.split(' ', QString::SplitBehavior::SkipEmptyParts); userinput.split(' ', QString::SplitBehavior::SkipEmptyParts);

View file

@ -89,7 +89,6 @@ private:
void PopupContextMenu(const QPoint& menu_location); void PopupContextMenu(const QPoint& menu_location);
void RefreshGameDirectory(); void RefreshGameDirectory();
bool ContainsAllWords(const QString& haystack, const QString& userinput) const;
SearchField* search_field; SearchField* search_field;
GMainWindow* main_window = nullptr; GMainWindow* main_window = nullptr;