mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-10 19:09:45 +01:00
Remove std::strings from levelZipCallback()
There's basically no reason to use heap-allocated strings here, so it's all gone now.
This commit is contained in:
parent
5d4c1b7e9d
commit
2aeb3f35ce
1 changed files with 4 additions and 6 deletions
|
@ -80,17 +80,15 @@ static bool compare_nocase (std::string first, std::string second)
|
|||
|
||||
static void levelZipCallback(const char* filename)
|
||||
{
|
||||
std::string filename_ = filename;
|
||||
|
||||
if (endsWith(filename_.c_str(), ".zip"))
|
||||
if (endsWith(filename, ".zip"))
|
||||
{
|
||||
PHYSFS_File* zip = PHYSFS_openRead(filename_.c_str());
|
||||
PHYSFS_File* zip = PHYSFS_openRead(filename);
|
||||
|
||||
if (!PHYSFS_mountHandle(zip, filename_.c_str(), "levels", 1))
|
||||
if (!PHYSFS_mountHandle(zip, filename, "levels", 1))
|
||||
{
|
||||
printf(
|
||||
"Could not mount %s: %s\n",
|
||||
filename_.c_str(),
|
||||
filename,
|
||||
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue