ISO8601: Conditional compilation allows Taskserver to reuse code

This commit is contained in:
Paul Beckingham 2015-11-08 17:02:02 -05:00
parent 560bf53f42
commit 0141d10d56

View file

@ -32,7 +32,9 @@
#include <assert.h> #include <assert.h>
#include <Lexer.h> #include <Lexer.h>
#include <util.h> #include <util.h>
#ifdef PRODUCT_TASKWARRIOR
#include <Dates.h> #include <Dates.h>
#endif
#include <text.h> #include <text.h>
#include <utf8.h> #include <utf8.h>
#include <i18n.h> #include <i18n.h>
@ -614,6 +616,7 @@ bool ISO8601d::parse_formatted (Nibbler& n, const std::string& format)
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
bool ISO8601d::parse_named (Nibbler& n) bool ISO8601d::parse_named (Nibbler& n)
{ {
#ifdef PRODUCT_TASKWARRIOR
n.save (); n.save ();
std::string token; std::string token;
if (n.getUntilWS (token)) if (n.getUntilWS (token))
@ -627,6 +630,8 @@ bool ISO8601d::parse_named (Nibbler& n)
} }
n.restore (); n.restore ();
#endif
return false; return false;
} }