From 90f2d2aeffdb345e9fdfc5c3e56fffa71281f2ee Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 21 Jan 2013 21:50:36 -0800 Subject: Remove unnecessary includes, speeding up recompilation --- src/common/extract.hpp | 60 ++++++++------------------------------------------ 1 file changed, 9 insertions(+), 51 deletions(-) (limited to 'src/common/extract.hpp') 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 +// Copyright © 2012-2013 Ben Longbons // // 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 . +#include "sanity.hpp" + #include #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 __attribute__((deprecated)) @@ -160,42 +152,8 @@ bool extract(const_string str, VRecord 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 -- cgit v1.2.3-60-g2f50