summaryrefslogtreecommitdiff
path: root/src/resources/atlas/atlasresource.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-06-06 23:34:34 +0300
committerAndrei Karas <akaras@inbox.ru>2017-06-07 19:23:40 +0300
commit36ba43d6ea38062b17f7e63ef659962bfc51c64d (patch)
tree190156cb88b13a38a6d13c69ee0742cc078065a1 /src/resources/atlas/atlasresource.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadplus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
plus-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/resources/atlas/atlasresource.cpp')
-rw-r--r--src/resources/atlas/atlasresource.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/atlas/atlasresource.cpp b/src/resources/atlas/atlasresource.cpp
index eab7c660e..51a807975 100644
--- a/src/resources/atlas/atlasresource.cpp
+++ b/src/resources/atlas/atlasresource.cpp
@@ -34,21 +34,21 @@ AtlasResource::~AtlasResource()
FOR_EACH (std::vector<TextureAtlas*>::iterator, it, atlases)
{
TextureAtlas *const atlas = *it;
- if (atlas)
+ if (atlas != nullptr)
{
FOR_EACH (std::vector<AtlasItem*>::iterator, it2, atlas->items)
{
AtlasItem *const item = *it2;
- if (item)
+ if (item != nullptr)
{
Image *const image2 = item->image;
- if (image2)
+ if (image2 != nullptr)
image2->decRef();
delete item;
}
}
Image *const image = atlas->atlasImage;
- if (image)
+ if (image != nullptr)
image->decRef();
delete atlas;
}
@@ -58,7 +58,7 @@ AtlasResource::~AtlasResource()
void AtlasResource::incRef()
{
- if (!mRefCount)
+ if (mRefCount == 0u)
AtlasManager::injectToResources(this);
Resource::incRef();
}
@@ -66,7 +66,7 @@ void AtlasResource::incRef()
void AtlasResource::decRef()
{
Resource::decRef();
- if (!mRefCount)
+ if (mRefCount == 0u)
AtlasManager::moveToDeleted(this);
}