diff options
| author | untodesu <kirill@untode.su> | 2025-06-25 00:44:36 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-06-25 00:44:36 +0500 |
| commit | 88c01588aa0830e219eaa62588839e4d1e2883ce (patch) | |
| tree | 602bb27dd3399aab4aae8c19630e3b7a8dac824b /core/binfile.cc | |
| parent | 99cf6cca8dbbc1e563c10cf0167432d3d8af9783 (diff) | |
| download | voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.tar.bz2 voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.zip | |
Clang-format the entire source code
Diffstat (limited to 'core/binfile.cc')
| -rw-r--r-- | core/binfile.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/binfile.cc b/core/binfile.cc index 34af3ca..aa39039 100644 --- a/core/binfile.cc +++ b/core/binfile.cc @@ -1,4 +1,5 @@ #include "core/pch.hh" + #include "core/binfile.hh" #include "core/resource.hh" @@ -6,7 +7,7 @@ static emhash8::HashMap<std::string, resource_ptr<BinFile>> resource_map; template<> -resource_ptr<BinFile> resource::load<BinFile>(const char *name, unsigned int flags) +resource_ptr<BinFile> resource::load<BinFile>(const char* name, unsigned int flags) { auto it = resource_map.find(name); @@ -35,10 +36,12 @@ resource_ptr<BinFile> resource::load<BinFile>(const char *name, unsigned int fla template<> void resource::hard_cleanup<BinFile>(void) { - for(const auto &it : resource_map) { - if(it.second.use_count() > 1L) + for(const auto& it : resource_map) { + if(it.second.use_count() > 1L) { spdlog::warn("resource: zombie resource [BinFile] {} [use_count={}]", it.first, it.second.use_count()); - else spdlog::debug("resource: releasing [BinFile] {}", it.first); + } else { + spdlog::debug("resource: releasing [BinFile] {}", it.first); + } delete[] it.second->buffer; } |
