diff options
author | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 11:58:47 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2014-12-23 12:07:54 +0100 |
commit | c315b41d8fd2ee37a36eaaafec10994623392df3 (patch) | |
tree | 6f338e8ef5bcb37b8f02a6b4f6792bf54fb5712d /src/spell_type.cc | |
parent | 45ec003a1de7857ac7dddb0732a9d005612b886f (diff) |
Rework spell_type_description_foreach to use lambdas
Diffstat (limited to 'src/spell_type.cc')
-rw-r--r-- | src/spell_type.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/spell_type.cc b/src/spell_type.cc index 5d830d8a..9851657d 100644 --- a/src/spell_type.cc +++ b/src/spell_type.cc @@ -1,4 +1,5 @@ #include "spell_type.h" +#include "spell_type.hpp" #include "range.h" #include "device_allocation.h" #include "dice.h" @@ -312,12 +313,11 @@ int spell_type_skill_level(spell_type *spell) return spell->skill_level; } -void spell_type_description_foreach(spell_type *spell, void (*callback)(void *data, cptr text), void *data) +void spell_type_description_foreach(spell_type *spell, std::function<void (std::string const &text)> callback) { - assert(callback != NULL); for (auto line: spell->m_description) { - callback(data, line.c_str()); + callback(line); } } |