From 2198ecc98ecc5e94f2856795065d198557387ade Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Nov 2014 15:15:54 +0300 Subject: Add more profiler labels. --- src/resources/resourcemanager.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/resources/resourcemanager.cpp') diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index 9fd445ffc..5ae057748 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -544,13 +544,20 @@ struct DyedImageLoader final std::string path; static Resource *load(const void *const v) { + BLOCK_START("DyedImageLoader::load") if (!v) + { + BLOCK_END("DyedImageLoader::load") return nullptr; + } const DyedImageLoader *const rl = static_cast(v); if (!rl->manager) + { + BLOCK_END("DyedImageLoader::load") return nullptr; + } std::string path1 = rl->path; const size_t p = path1.find('|'); @@ -564,11 +571,13 @@ struct DyedImageLoader final if (!rw) { delete d; + BLOCK_END("DyedImageLoader::load") return nullptr; } Resource *const res = d ? imageHelper->load(rw, *d) : imageHelper->load(rw); delete d; + BLOCK_END("DyedImageLoader::load") return res; } }; -- cgit v1.2.3-60-g2f50