summaryrefslogtreecommitdiff
path: root/src/common/extract.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-01-21 21:50:36 -0800
committerBen Longbons <b.r.longbons@gmail.com>2013-02-01 12:36:51 -0800
commit90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee (patch)
tree42667ee8211853727c14645c05280e2500a7a994 /src/common/extract.hpp
parentb3ca4bccc4fa6b7f5d637bdecb4fac6ca9649f3c (diff)
downloadtmwa-90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee.tar.gz
tmwa-90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee.tar.bz2
tmwa-90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee.tar.xz
tmwa-90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee.zip
Remove unnecessary includes, speeding up recompilation
Diffstat (limited to 'src/common/extract.hpp')
-rw-r--r--src/common/extract.hpp60
1 files changed, 9 insertions, 51 deletions
diff --git a/src/common/extract.hpp b/src/common/extract.hpp
index 24456be..c60ce2a 100644
--- a/src/common/extract.hpp
+++ b/src/common/extract.hpp
@@ -1,8 +1,8 @@
#ifndef EXTRACT_HPP
#define EXTRACT_HPP
-// extract.hpp - a simple, heirarchail, tokenizer
+// extract.hpp - a simple, hierarchical, tokenizer
//
-// Copyright © 2012 Ben Longbons <b.r.longbons@gmail.com>
+// Copyright © 2012-2013 Ben Longbons <b.r.longbons@gmail.com>
//
// This file is part of The Mana World (Athena server)
//
@@ -19,6 +19,8 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
+#include "sanity.hpp"
+
#include <algorithm>
#include "const_array.hpp"
@@ -70,19 +72,9 @@ bool extract(const_string str, T *iv)
return true;
}
-inline
-bool extract(const_string str, const_string *rv)
-{
- *rv = str;
- return true;
-}
+bool extract(const_string str, const_string *rv);
-inline
-bool extract(const_string str, std::string *rv)
-{
- *rv = std::string(str.begin(), str.end());
- return true;
-}
+bool extract(const_string str, std::string *rv);
template<size_t N>
__attribute__((deprecated))
@@ -160,42 +152,8 @@ bool extract(const_string str, VRecord<split, T> rec)
&& extract(const_string(s + 1, str.end()), rec);
}
-inline
-bool extract(const_string str, struct global_reg *var)
-{
- return extract(str,
- record<','>(&var->str, &var->value));
-}
+bool extract(const_string str, struct global_reg *var);
+
+bool extract(const_string str, struct item *it);
-inline
-bool extract(const_string str, struct item *it)
-{
- return extract(str,
- record<','>(
- &it->id,
- &it->nameid,
- &it->amount,
- &it->equip,
- &it->identify,
- &it->refine,
- &it->attribute,
- &it->card[0],
- &it->card[1],
- &it->card[2],
- &it->card[3],
- &it->broken))
- || extract(str,
- record<','>(
- &it->id,
- &it->nameid,
- &it->amount,
- &it->equip,
- &it->identify,
- &it->refine,
- &it->attribute,
- &it->card[0],
- &it->card[1],
- &it->card[2],
- &it->card[3]));
-}
#endif // EXTRACT_HPP