From 40e92bb1da6ea73a84745007fb5d02d711b153a4 Mon Sep 17 00:00:00 2001 From: light7734 Date: Wed, 9 Jul 2025 20:15:29 +0330 Subject: [PATCH] refactor: remove some zombie code --- modules/engine/src/utils/file_manager.cpp | 48 ----------------------- 1 file changed, 48 deletions(-) diff --git a/modules/engine/src/utils/file_manager.cpp b/modules/engine/src/utils/file_manager.cpp index e528546..f42d54f 100644 --- a/modules/engine/src/utils/file_manager.cpp +++ b/modules/engine/src/utils/file_manager.cpp @@ -60,52 +60,4 @@ auto FileManager::read_text_file(const std::string &path) -> BasicFileHandle return { data, static_cast(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(m_data)); -// m_data = nullptr; -// m_size = 0ull; -// } - } // namespace Light