summaryrefslogtreecommitdiff
path: root/CyteKit/RegEx.hpp
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-03-04 21:52:46 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-03-04 21:52:46 -0800
commitf4f6714a329bf399840b3f9991b310bd17f7bed6 (patch)
tree63f2758b6de741020dcca8abe0d55146a4dfeddf /CyteKit/RegEx.hpp
parent8511eb452e6188051960d2d96473a7810f85f5f2 (diff)
Try removing constructor (this is so annoying :/).
Diffstat (limited to 'CyteKit/RegEx.hpp')
-rw-r--r--CyteKit/RegEx.hpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/CyteKit/RegEx.hpp b/CyteKit/RegEx.hpp
index 8892a3e..40068a7 100644
--- a/CyteKit/RegEx.hpp
+++ b/CyteKit/RegEx.hpp
@@ -58,14 +58,18 @@ class RegEx {
{
}
- RegEx(const char *regex, NSString *data = nil) :
+ RegEx(const char *regex) :
regex_(NULL),
size_(_not(size_t))
{
this->operator =(regex);
+ }
- if (data != nil)
- this->operator ()(data);
+ template <typename Type_>
+ RegEx(const char *regex, const Type_ &data) :
+ RegEx(regex)
+ {
+ this->operator ()(data);
}
void operator =(const char *regex) {