mirror of
https://github.com/rwengine/openrw.git
synced 2024-11-22 02:12:45 +01:00
remove unused method FileIndex::findFile
This commit is contained in:
parent
5e0659fccf
commit
d7dea62f04
@ -76,18 +76,6 @@ void FileIndex::indexArchive(const std::string& archive)
|
||||
}
|
||||
}
|
||||
|
||||
bool FileIndex::findFile(const std::string& filename, FileIndex::IndexData& filedata)
|
||||
{
|
||||
auto iterator = files.find(filename);
|
||||
if( iterator == files.end() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
filedata = iterator->second;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
FileHandle FileIndex::openFile(const std::string& filename)
|
||||
{
|
||||
auto iterator = files.find( filename );
|
||||
|
@ -92,13 +92,6 @@ public:
|
||||
* file index.
|
||||
*/
|
||||
void indexArchive(const std::string& archive);
|
||||
|
||||
/**
|
||||
* Returns true if the file identified by filename is found within
|
||||
* the file index. If the file is found, the filedata parameter
|
||||
* is populated.
|
||||
*/
|
||||
bool findFile(const std::string& filename, IndexData& filedata);
|
||||
|
||||
/**
|
||||
* Returns a FileHandle for the file if it can be found in the
|
||||
|
@ -31,20 +31,6 @@ BOOST_AUTO_TEST_CASE(test_directory_paths)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_index)
|
||||
{
|
||||
FileIndex index;
|
||||
|
||||
index.indexTree(Global::getGamePath()+"/data");
|
||||
|
||||
FileIndex::IndexData data;
|
||||
BOOST_CHECK( index.findFile("cullzone.dat", data) );
|
||||
BOOST_CHECK_EQUAL( data.filename, "cullzone.dat" );
|
||||
BOOST_CHECK_EQUAL( data.originalName, "CULLZONE.DAT" );
|
||||
BOOST_CHECK( data.archive.empty() );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_file)
|
||||
{
|
||||
FileIndex index;
|
||||
@ -55,19 +41,6 @@ BOOST_AUTO_TEST_CASE(test_file)
|
||||
BOOST_CHECK( handle != nullptr );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_index_archive)
|
||||
{
|
||||
FileIndex index;
|
||||
|
||||
index.indexArchive(Global::getGamePath()+"/models/gta3.img");
|
||||
|
||||
FileIndex::IndexData data;
|
||||
BOOST_CHECK( index.findFile("landstal.dff", data) );
|
||||
BOOST_CHECK_EQUAL( data.filename, "landstal.dff" );
|
||||
BOOST_CHECK_EQUAL( data.originalName, "landstal.dff" );
|
||||
BOOST_CHECK_EQUAL( data.archive, "gta3.img" );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_file_archive)
|
||||
{
|
||||
FileIndex index;
|
||||
|
Loading…
Reference in New Issue
Block a user