Retire RE2_HAVE_LONGLONG. C++11 has long long.
Change-Id: If25893661bda6cbc71b45b443aee15125f27a9fc
Reviewed-on: https://code-review.googlesource.com/5393
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/re2.cc b/re2/re2.cc
index d75e109..4317e9d 100644
--- a/re2/re2.cc
+++ b/re2/re2.cc
@@ -1124,7 +1124,6 @@
return true;
}
-#if RE2_HAVE_LONGLONG
bool RE2::Arg::parse_longlong_radix(const char* str,
int n,
void* dest,
@@ -1163,7 +1162,6 @@
*(reinterpret_cast<uint64*>(dest)) = r;
return true;
}
-#endif
static bool parse_double_float(const char* str, int n, bool isfloat, void *dest) {
if (n == 0) return false;
diff --git a/re2/re2.h b/re2/re2.h
index 3bc7225..077b9fe 100644
--- a/re2/re2.h
+++ b/re2/re2.h
@@ -185,10 +185,6 @@
#include <string>
#include "re2/stringpiece.h"
-#ifndef RE2_HAVE_LONGLONG
-#define RE2_HAVE_LONGLONG 1
-#endif
-
namespace re2 {
using std::string;
@@ -686,10 +682,8 @@
static inline Arg CRadix(unsigned int* x);
static inline Arg CRadix(long* x);
static inline Arg CRadix(unsigned long* x);
- #if RE2_HAVE_LONGLONG
static inline Arg CRadix(long long* x);
static inline Arg CRadix(unsigned long long* x);
- #endif
static inline Arg Hex(short* x);
static inline Arg Hex(unsigned short* x);
@@ -697,10 +691,8 @@
static inline Arg Hex(unsigned int* x);
static inline Arg Hex(long* x);
static inline Arg Hex(unsigned long* x);
- #if RE2_HAVE_LONGLONG
static inline Arg Hex(long long* x);
static inline Arg Hex(unsigned long long* x);
- #endif
static inline Arg Octal(short* x);
static inline Arg Octal(unsigned short* x);
@@ -708,10 +700,8 @@
static inline Arg Octal(unsigned int* x);
static inline Arg Octal(long* x);
static inline Arg Octal(unsigned long* x);
- #if RE2_HAVE_LONGLONG
static inline Arg Octal(long long* x);
static inline Arg Octal(unsigned long long* x);
- #endif
private:
void Init(const StringPiece& pattern, const Options& options);
@@ -797,10 +787,8 @@
MAKE_PARSER(unsigned int, parse_uint);
MAKE_PARSER(long, parse_long);
MAKE_PARSER(unsigned long, parse_ulong);
- #if RE2_HAVE_LONGLONG
MAKE_PARSER(long long, parse_longlong);
MAKE_PARSER(unsigned long long, parse_ulonglong);
- #endif
MAKE_PARSER(float, parse_float);
MAKE_PARSER(double, parse_double);
MAKE_PARSER(string, parse_string);
@@ -846,10 +834,8 @@
DECLARE_INTEGER_PARSER(uint);
DECLARE_INTEGER_PARSER(long);
DECLARE_INTEGER_PARSER(ulong);
- #if RE2_HAVE_LONGLONG
DECLARE_INTEGER_PARSER(longlong);
DECLARE_INTEGER_PARSER(ulonglong);
- #endif
#undef DECLARE_INTEGER_PARSER
};
@@ -876,10 +862,8 @@
MAKE_INTEGER_PARSER(unsigned int, uint)
MAKE_INTEGER_PARSER(long, long)
MAKE_INTEGER_PARSER(unsigned long, ulong)
-#if RE2_HAVE_LONGLONG
MAKE_INTEGER_PARSER(long long, longlong)
MAKE_INTEGER_PARSER(unsigned long long, ulonglong)
-#endif
#undef MAKE_INTEGER_PARSER