Ticket #8729: 3_remove_redundant_parameter.patch

File 3_remove_redundant_parameter.patch, 1.9 KB (added by jvprat, 17 years ago)
  • common/fs.h

     
    240240         * are scanned before going into subdirectories.
    241241         *
    242242         * @param results List to put the matches in.
    243          * @param dir Directory to search within.
    244243         * @param pattern Pattern of the files to look for.
    245244         * @param hidden Whether to search hidden files or not.
    246245         * @param exhaustive Whether to continue searching after one match has been found.
    247246         *
    248247         * @return true if matches could be found, false otherwise.
    249248         */
    250         virtual bool lookupFile(FSList &results, FilesystemNode &dir, Common::String &pattern, bool hidden, bool exhaustive) const;
     249        virtual bool lookupFile(FSList &results, Common::String &pattern, bool hidden, bool exhaustive) const;
    251250
    252251protected:
    253252        /**
  • common/fs.cpp

     
    183183        return ((matches > 0) ? true : false);
    184184}
    185185
    186 bool FilesystemNode::lookupFile(FSList &results, FilesystemNode &dir, Common::String &pattern, bool hidden, bool exhaustive) const {
     186bool FilesystemNode::lookupFile(FSList &results, Common::String &pattern, bool hidden, bool exhaustive) const {
    187187        int matches;
    188188
    189         if (!dir.isDirectory())
     189        if (!isDirectory())
    190190                return false;
    191191
     192        FilesystemNode dir = *this;
    192193        matches = lookupFileRec(results, dir, pattern, hidden, exhaustive);
    193194
    194195        return ((matches > 0) ? true : false);
  • backends/saves/default/default-saves.cpp

     
    119119        Common::StringList results;
    120120        Common::String search(regex);
    121121
    122         if (savePath.lookupFile(savefiles, savePath, search, false, true)) {
     122        if (savePath.lookupFile(savefiles, search, false, true)) {
    123123                for (FSList::const_iterator file = savefiles.begin(); file != savefiles.end(); file++) {
    124124                        results.push_back(file->getPath());
    125125                }