diff options
author | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2016-09-17 09:58:14 +0200 |
commit | 8bbf783ead4517465445272f9144cf06bdac9be7 (patch) | |
tree | 9fa9cc4de0c53df33c557d66a9efbc6781f6fb94 /src/object2.cc | |
parent | 013e27d39ee8ee513208d2855c7e3f6252f0c0bf (diff) |
Refactor object_type 'artifact name' field to std::string
We don't really need quarks for this since we're not nearly as
memory-constrained these days.
Diffstat (limited to 'src/object2.cc')
-rw-r--r-- | src/object2.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/object2.cc b/src/object2.cc index b4226f76..f96426fb 100644 --- a/src/object2.cc +++ b/src/object2.cc @@ -963,7 +963,7 @@ s32b flag_cost(object_type const *o_ptr, int plusses) /* Also, give some extra for activatable powers... */ - if ((o_ptr->art_name) && (o_ptr->art_flags & TR_ACTIVATE)) + if ((!o_ptr->artifact_name.empty()) && (o_ptr->art_flags & TR_ACTIVATE)) { int type = o_ptr->xtra2; @@ -2036,7 +2036,7 @@ static void object_mention(object_type *o_ptr) } /* Random Artifact */ - else if (o_ptr->art_name) + else if (!o_ptr->artifact_name.empty()) { msg_print("Random artifact"); } @@ -4177,7 +4177,10 @@ void apply_magic(object_type *o_ptr, int lev, bool_ okay, bool_ good, bool_ grea } } - if (o_ptr->art_name) rating += 40; + if (!o_ptr->artifact_name.empty()) + { + rating += 40; + } /* Hack -- analyze ego-items */ else if (o_ptr->name2) |