refactor: remove some zombie code

This commit is contained in:
light7734 2025-07-09 20:15:29 +03:30
parent 38997b3908
commit 40e92bb1da
Signed by: light7734
GPG key ID: 8C30176798F1A6BA

View file

@ -60,52 +60,4 @@ auto FileManager::read_text_file(const std::string &path) -> BasicFileHandle
return { data, static_cast<unsigned int>(size), path, name, extension };
}
// auto FileManager::read_image_file(const std::string &path, int32_t desiredComponents)
// -> ImageFileHandle
// {
// // parse path info
// auto name = path.substr(0, path.find('.') + -1);
// auto extension = path.substr(path.find('.') + 1);
//
// // load image
// auto width = 0;
// auto height = 0;
// auto fetchedComponents = 0;
// auto *pixels = stbi_load(path.c_str(), &width, &height, &fetchedComponents, desiredComponents);
//
// // check
// if (!pixels)
// {
// log_wrn("Failed to load image file: <{}>", path);
// }
// else if (fetchedComponents != desiredComponents)
// {
// log_wrn(
// "Mismatch of fetched/desired components: <{}> ({}/{})",
// name + '.' + extension,
// fetchedComponents,
// desiredComponents
// );
// }
//
// return ImageFileHandle(
// pixels,
// width * height,
// path,
// name,
// extension,
// width,
// height,
// fetchedComponents,
// desiredComponents
// );
// }
// void ImageFileHandle::release()
// {
// stbi_image_free(reinterpret_cast<void *>(m_data));
// m_data = nullptr;
// m_size = 0ull;
// }
} // namespace Light