Skip to content

Commit

Permalink
Change return type to bool
Browse files Browse the repository at this point in the history
  • Loading branch information
Eli2 committed Jun 7, 2014
1 parent 4e5e7c0 commit 0bf45a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/scene/Interactive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,21 +147,21 @@ bool ValidIONum(EntityHandle num) {
return !(num < 0 || num >= long(entities.size()) || !entities[num]);
}

long ValidIOAddress(const Entity * io) {
bool ValidIOAddress(const Entity * io) {

if(!io)
return 0;
return false;

for(size_t i = 0; i < entities.size(); i++) {
const EntityHandle handle = EntityHandle(i);
Entity * e = entities[handle];

if(e == io) {
return 1;
return true;
}
}

return 0;
return false;
}

static float ARX_INTERACTIVE_fGetPrice(Entity * io, Entity * shop) {
Expand Down
2 changes: 1 addition & 1 deletion src/scene/Interactive.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void ARX_INTERACTIVE_DestroyIOdelayedExecute();
* We should instead use a proper weak pointer!
*/
bool ValidIONum(EntityHandle num);
long ValidIOAddress(const Entity * io);
bool ValidIOAddress(const Entity * io);

void RestoreInitialIOStatusOfIO(Entity * io);

Expand Down

0 comments on commit 0bf45a8

Please sign in to comment.