summaryrefslogtreecommitdiff
path: root/src/being/flooritem.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/being/flooritem.cpp
parentf1518dd8476c968a43fa57cfb06198e290a4f77a (diff)
downloadmv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.gz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.bz2
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.tar.xz
mv-36ba43d6ea38062b17f7e63ef659962bfc51c64d.zip
Fix clang-tidy check readability-implicit-bool-cast.
Diffstat (limited to 'src/being/flooritem.cpp')
-rw-r--r--src/being/flooritem.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/being/flooritem.cpp b/src/being/flooritem.cpp
index bc60c5e2a..3ee4a9d51 100644
--- a/src/being/flooritem.cpp
+++ b/src/being/flooritem.cpp
@@ -79,7 +79,7 @@ void FloorItem::postInit(Map *const map, int subX, int subY)
{
setMap(map);
const ItemInfo &info = ItemDB::get(mItemId);
- if (map)
+ if (map != nullptr)
{
const int maxX = info.getMaxFloorOffsetX();
const int maxY = info.getMaxFloorOffsetY();
@@ -127,7 +127,7 @@ void FloorItem::postInit(Map *const map, int subX, int subY)
void FloorItem::setCards(const int *const cards,
int sz)
{
- if (sz < 0 || !cards)
+ if (sz < 0 || cards == nullptr)
return;
if (sz > maxCards)
sz = maxCards;
@@ -158,7 +158,7 @@ std::string FloorItem::getName() const
void FloorItem::draw(Graphics *const graphics,
const int offsetX, const int offsetY) const
{
- if (!mMap)
+ if (mMap == nullptr)
return;
BLOCK_START("FloorItem::draw")
@@ -204,7 +204,7 @@ void FloorItem::draw(Graphics *const graphics,
if (mHighlight)
{
- if (font && mAmount > 1)
+ if (font != nullptr && mAmount > 1)
{
const Color &color = userPalette->getColor(
UserColorId::FLOOR_ITEM_TEXT);