From 54c61a89f650dccd01e0da7cdc799f4e14e507f3 Mon Sep 17 00:00:00 2001 From: korenkonder Date: Sat, 3 Feb 2024 15:01:09 +0300 Subject: [PATCH] ... --- src/CRE/Glitter/file_reader.cpp | 8 ++++---- src/CRE/file_handler.cpp | 2 +- src/CRE/file_handler.hpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/CRE/Glitter/file_reader.cpp b/src/CRE/Glitter/file_reader.cpp index 8480059f..71a6c91b 100644 --- a/src/CRE/Glitter/file_reader.cpp +++ b/src/CRE/Glitter/file_reader.cpp @@ -10,15 +10,15 @@ #include "../object.hpp" namespace Glitter { - FileReader::FileReader(GLT) : file_handler(), farc(), effect_group(), - load_count(), type(), path(), file(), state(), init_scene(), obj_db(), tex_db() { + FileReader::FileReader(GLT) + : file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() { emission = -1.0f; type = GLT_VAL; hash = GLT_VAL != Glitter::FT ? hash_murmurhash_empty : hash_fnv1a64m_empty; } FileReader::FileReader(GLT, const char* path, const char* file, float_t emission) - : effect_group(), load_count(), obj_db(), tex_db() { + : file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() { this->path = path ? path : (GLT_VAL != Glitter::FT ? "root+/particle/" : "rom/particle/"); this->file = file; @@ -30,7 +30,7 @@ namespace Glitter { } FileReader::FileReader(GLT, const wchar_t* path, const wchar_t* file, float_t emission) - : effect_group(), load_count(), obj_db(), tex_db() { + : file_handler(), farc(), effect_group(), load_count(), state(), init_scene(), obj_db(), tex_db() { char* path_temp = utf16_to_utf8(path); char* file_temp = utf16_to_utf8(file); this->path = path_temp ? path_temp diff --git a/src/CRE/file_handler.cpp b/src/CRE/file_handler.cpp index b2180ec0..21834ba7 100644 --- a/src/CRE/file_handler.cpp +++ b/src/CRE/file_handler.cpp @@ -372,7 +372,7 @@ const void* p_file_handler::get_data() { return ptr->data; } -ssize_t p_file_handler::get_size() { +size_t p_file_handler::get_size() { if (!ptr || ptr->not_ready || ptr->size < 0) return 0; return ptr->size; diff --git a/src/CRE/file_handler.hpp b/src/CRE/file_handler.hpp index 86f6aa9e..a09e1ce7 100644 --- a/src/CRE/file_handler.hpp +++ b/src/CRE/file_handler.hpp @@ -31,7 +31,7 @@ struct file_handler { std::string file; bool cache; file_handler_callback_func callback[2]; - ssize_t size; + size_t size; void* data; void* ds; @@ -55,7 +55,7 @@ struct p_file_handler { void call_free_callback(); bool check_not_ready(); const void* get_data(); - ssize_t get_size(); + size_t get_size(); bool read_file(void* data, const char* path); bool read_file(void* data, const char* dir, const char* farc_file, const char* file, bool cache); bool read_file(void* data, const char* dir, const char* file);