diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/resourcemanager.cpp | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/resources/resourcemanager.cpp b/src/resources/resourcemanager.cpp index bb566d9f4..f625dd971 100644 --- a/src/resources/resourcemanager.cpp +++ b/src/resources/resourcemanager.cpp @@ -520,7 +520,7 @@ Resource *ResourceManager::get(const std::string &idPath, struct ResourceLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; ResourceManager::loader fun; @@ -556,7 +556,7 @@ SoundEffect *ResourceManager::getSoundEffect(const std::string &idPath) struct DyedImageLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; static Resource *load(const void *const v) { @@ -606,9 +606,10 @@ Image *ResourceManager::getImage(const std::string &idPath) struct ImageSetLoader final { - ResourceManager *manager; + ResourceManager *manager = nullptr; std::string path; - int w, h; + int w = 0; + int h = 0; static Resource *load(const void *const v) { if (!v) @@ -640,9 +641,10 @@ ImageSet *ResourceManager::getImageSet(const std::string &imagePath, struct SubImageSetLoader final { - ResourceManager *manager; - Image *parent; - int width, height; + ResourceManager *manager = nullptr; + Image *parent = nullptr; + int width = 0; + int height = 0; static Resource *load(const void *const v) { if (!v) @@ -675,10 +677,12 @@ ImageSet *ResourceManager::getSubImageSet(Image *const parent, struct SubImageLoader final { - ResourceManager *manager; - Image *parent; - int x, y; - int width, height; + ResourceManager *manager = nullptr; + Image *parent = nullptr; + int x = 0; + int y = 0; + int width = 0; + int height = 0; static Resource *load(const void *const v) { if (!v) @@ -714,7 +718,7 @@ Image *ResourceManager::getSubImage(Image *const parent, struct AtlasLoader final { const std::string name; - const StringVect *files; + const StringVect *files = nullptr; static Resource *load(const void *const v) { @@ -738,7 +742,7 @@ Resource *ResourceManager::getAtlas(const std::string &name, struct ShaderLoader final { const std::string name; - const unsigned int type; + const unsigned int type = 0U; static Resource *load(const void *const v) { @@ -763,7 +767,7 @@ struct ShaderProgramLoader final { const std::string vertex; const std::string fragment; - const bool isNewShader; + const bool isNewShader = true; static Resource *load(const void *const v) { |