mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2025-01-25 10:14:58 +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)
|
static void levelZipCallback(const char* filename)
|
||||||
{
|
{
|
||||||
std::string filename_ = filename;
|
if (endsWith(filename, ".zip"))
|
||||||
|
|
||||||
if (endsWith(filename_.c_str(), ".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(
|
printf(
|
||||||
"Could not mount %s: %s\n",
|
"Could not mount %s: %s\n",
|
||||||
filename_.c_str(),
|
filename,
|
||||||
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
|
PHYSFS_getErrorByCode(PHYSFS_getLastErrorCode())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue