Skip to content

Commit

Permalink
clean up syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Mar 19, 2024
1 parent 9f5eee7 commit 862f882
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions library/modules/Items.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2402,11 +2402,8 @@ int32_t Items::getCapacity(df::item* item)
case df::enums::item_type::QUIVER:
return 1200;
case df::enums::item_type::TOOL:
{
auto tool = virtual_cast<df::item_toolst>(item);
if (tool)
return tool->subtype->container_capacity;
}
if (auto tool = virtual_cast<df::item_toolst>(item))
return tool->subtype->container_capacity;
// fall through
default:
; // fall through to default exit
Expand Down

0 comments on commit 862f882

Please sign in to comment.