summaryrefslogtreecommitdiff
path: root/src/spells5.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
committerBardur Arantsson <bardur@scientician.net>2019-02-15 19:20:25 +0100
commitd4112fae1ea4496221892e2edd84ed99c3176463 (patch)
tree75a8601caaa9d315cf9f44d57087baded564291a /src/spells5.cc
parent189a5137bc65bc0f618d5f9ae18f461159e3d7dc (diff)
Replace C-style string code with boost::algorithm::* equivalents
Diffstat (limited to 'src/spells5.cc')
-rw-r--r--src/spells5.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/spells5.cc b/src/spells5.cc
index bd04a0d2..b61afcaf 100644
--- a/src/spells5.cc
+++ b/src/spells5.cc
@@ -7,8 +7,11 @@
#include "variable.hpp"
#include "z-rand.hpp"
+#include <boost/algorithm/string/predicate.hpp>
#include <cassert>
+using boost::algorithm::equals;
+
static s16b school_spells_count = 0;
static struct spell_type *school_spells[SCHOOL_SPELLS_MAX];
@@ -43,7 +46,7 @@ boost::optional<int> find_spell(const char *name)
for (i = 0; i < school_spells_count; i++)
{
- if (streq(spell_type_name(spell_at(i)), name))
+ if (equals(spell_type_name(spell_at(i)), name))
{
return boost::make_optional(i);
}