summaryrefslogtreecommitdiff
path: root/src/common/extract.hpp
diff options
context:
space:
mode:
authorBen Longbons <b.r.longbons@gmail.com>2013-04-09 17:59:01 -0700
committerBen Longbons <b.r.longbons@gmail.com>2013-04-11 14:21:42 -0700
commit8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7 (patch)
tree407e8fb0258440c6dd60cca98b6304fb946eba70 /src/common/extract.hpp
parent756085f91d0f01c69550735cf2e60cae54d9c72a (diff)
downloadtmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.gz
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.bz2
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.tar.xz
tmwa-8ce76f29ab6bc6ea0809c085b4f395373b3cb8d7.zip
Also implement x32 support
Diffstat (limited to 'src/common/extract.hpp')
-rw-r--r--src/common/extract.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/common/extract.hpp b/src/common/extract.hpp
index 3198d5d..ae1a74b 100644
--- a/src/common/extract.hpp
+++ b/src/common/extract.hpp
@@ -25,6 +25,7 @@
#include "const_array.hpp"
#include "mmo.hpp"
+#include "utils.hpp"
template<class T, typename=typename std::enable_if<std::is_integral<T>::value && !std::is_same<T, char>::value>::type>
bool extract(const_string str, T *iv)
@@ -58,6 +59,12 @@ bool extract(const_string str, T *iv)
}
}
+inline
+bool extract(const_string str, TimeT *tv)
+{
+ return extract(str, &tv->value);
+}
+
// extra typename=void to workaround some duplicate overload rule
template<class T, typename=typename std::enable_if<std::is_enum<T>::value>::type, typename=void>
bool extract(const_string str, T *iv)