diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-12-13 17:51:41 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-12-13 17:51:41 +0300 |
commit | e17da4740c510e3b28634b02298b661a151987f0 (patch) | |
tree | e83d868000186a249c946d80aa478b0119eda494 /src/resources/resourcemanager.cpp | |
parent | d8e20baa960b95c1ca1dfd7b7e6fc457c695d106 (diff) | |
download | manaplus-e17da4740c510e3b28634b02298b661a151987f0.tar.gz manaplus-e17da4740c510e3b28634b02298b661a151987f0.tar.bz2 manaplus-e17da4740c510e3b28634b02298b661a151987f0.tar.xz manaplus-e17da4740c510e3b28634b02298b661a151987f0.zip |
Fix code style.
Diffstat (limited to 'src/resources/resourcemanager.cpp')
-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) { |