diff options
author | hop311 <hop3114@gmail.com> | 2023-12-28 21:19:12 +0100 |
---|---|---|
committer | hop311 <hop3114@gmail.com> | 2023-12-28 21:22:27 +0100 |
commit | d04d0247479b229407048a37cd0ad60933aa3bf1 (patch) | |
tree | cb3671592c2d1e7697371510f455de7e99f75a12 /extension/src/openvic-extension/singletons/AssetManager.hpp | |
parent | c21e9b7a529aebcf0148a6671377c3e8478fafdf (diff) |
Use `ERR_FAIL_*` macros where possible
Diffstat (limited to 'extension/src/openvic-extension/singletons/AssetManager.hpp')
-rw-r--r-- | extension/src/openvic-extension/singletons/AssetManager.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extension/src/openvic-extension/singletons/AssetManager.hpp b/extension/src/openvic-extension/singletons/AssetManager.hpp index e6a7664..40577ad 100644 --- a/extension/src/openvic-extension/singletons/AssetManager.hpp +++ b/extension/src/openvic-extension/singletons/AssetManager.hpp @@ -23,8 +23,8 @@ namespace OpenVic { image_asset_map_t image_assets; font_map_t fonts; - static godot::Ref<godot::Image> _load_image(godot::StringName path); - image_asset_map_t::iterator _get_image_asset(godot::StringName path); + static godot::Ref<godot::Image> _load_image(godot::StringName const& path); + image_asset_map_t::iterator _get_image_asset(godot::StringName const& path); protected: static void _bind_methods(); @@ -37,15 +37,15 @@ namespace OpenVic { /* Search for and load an image at the specified path relative to the game defines, first checking the AssetManager's * image cache (if cache is true) in case it has already been loaded, and returning nullptr if image loading fails. */ - godot::Ref<godot::Image> get_image(godot::StringName path, bool cache = true); + godot::Ref<godot::Image> get_image(godot::StringName const& path, bool cache = true); /* Create a texture from an image found at the specified path relative to the game defines, fist checking * AssetManager's texture cache in case it has already been loaded, and returning nullptr if image loading * or texture creation fails. */ - godot::Ref<godot::ImageTexture> get_texture(godot::StringName path); + godot::Ref<godot::ImageTexture> get_texture(godot::StringName const& path); /* Search for and load a font with the specified name from the game defines' font directory, first checking the * AssetManager's font cache in case it has already been loaded, and returning nullptr if font loading fails. */ - godot::Ref<godot::Font> get_font(godot::StringName name); + godot::Ref<godot::Font> get_font(godot::StringName const& name); }; } |