Skip to content

Commit addf9d3

Browse files
committed
Fix return types.
1 parent 5beffc9 commit addf9d3

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/item.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1075,7 +1075,7 @@ ItemCombination *Item::getCombination() const {
10751075
Item *Item::putInContainer(Item *it) {
10761076
ItemFeatureContainer *cont=(ItemFeatureContainer *)it->getFeature(ItemFeature::CONTAINER);
10771077
if ( ! cont ) return NULL; // it is not a container
1078-
if ( it->stack.size() >= cont->size ) return false; // no more room
1078+
if ( it->stack.size() >= cont->size ) return nullptr; // no more room
10791079
Item *item = addToList(&it->stack);
10801080
item->container=it;
10811081
item->x=it->x;

src/map_dungeon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,7 @@ bool Dungeon::hasItemType(int x, int y, const ItemType *type) {
726726
}
727727

728728
Item *Dungeon::getItem(int x, int y, const ItemType *type) {
729-
if (!IN_RECTANGLE(x,y,width,height)) return false;
729+
if (!IN_RECTANGLE(x,y,width,height)) return nullptr;
730730
Cell *cell=getCell(x,y);
731731
for (Item **it=cell->items.begin(); it != cell->items.end(); it++) {
732732
if ((*it)->isA(type)) return *it;
@@ -735,7 +735,7 @@ Item *Dungeon::getItem(int x, int y, const ItemType *type) {
735735
}
736736

737737
Item *Dungeon::getItem(int x, int y, const char *typeName) {
738-
if (!IN_RECTANGLE(x,y,width,height)) return false;
738+
if (!IN_RECTANGLE(x,y,width,height)) return nullptr;
739739
return getItem(x,y,ItemType::getType(typeName));
740740
}
741741

0 commit comments

Comments
 (0)