summaryrefslogtreecommitdiff
path: root/src/squelch
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2018-03-25 20:07:30 +0200
committerBardur Arantsson <bardur@scientician.net>2018-03-25 20:07:30 +0200
commit45651c61e35ee203c434601ace5e95ccd5474375 (patch)
treec52f30588611a72deebd8f7f83199d1b0a644b5e /src/squelch
parent73238d2c617be1600bbb067e0d0bd388488f68d3 (diff)
Add object_type->k_ptr to point directly to the object_kind
The idea is to eventually migrate off k_idx completely, but there are still a couple of uses left.
Diffstat (limited to 'src/squelch')
-rw-r--r--src/squelch/condition.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/squelch/condition.cc b/src/squelch/condition.cc
index 72ac1c8b..2dae0971 100644
--- a/src/squelch/condition.cc
+++ b/src/squelch/condition.cc
@@ -878,9 +878,7 @@ void StateCondition::to_json(jsoncons::json &j) const
bool SymbolCondition::is_match(object_type *o_ptr) const
{
- auto const &k_info = game->edit_data.k_info;
-
- return k_info.at(o_ptr->k_idx).d_char == m_symbol;
+ return o_ptr->k_ptr->d_char == m_symbol;
}
std::shared_ptr<Condition> SymbolCondition::from_json(jsoncons::json const &j)