if else shortcut
This commit is contained in:
@@ -129,15 +129,8 @@ namespace OpenVulkano::Scene
|
||||
uint32_t packedFlag = packIntoSingleFile;
|
||||
if (packIntoSingleFile)
|
||||
{
|
||||
bool isPng = std::filesystem::path(fileName).extension() == ".png";
|
||||
if (!isPng)
|
||||
{
|
||||
fileName += "_packed.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
fileName.insert(fileName.size() - 4, "_packed");
|
||||
}
|
||||
std::filesystem::path fPath(fileName);
|
||||
fileName = (fPath.parent_path() / fPath.stem()).string() + "_packed.png";
|
||||
SavePng(fileName);
|
||||
}
|
||||
std::fstream fs(fileName.c_str(), std::ios_base::out | std::ios_base::binary | (packedFlag ? std::ios_base::app : std::ios_base::trunc));
|
||||
|
||||
Reference in New Issue
Block a user