forked from jasder/antlr
Add defined() before #if SYM > val evaluations
- Change "#if SYM > x" to "#if defined(SYM) && SYM > x" as a pattern. In StringUtils.h this follows the pattern used earlier in the file.
This commit is contained in:
parent
274e3c2d3b
commit
8fd4bcfa33
|
@ -77,7 +77,7 @@
|
||||||
|
|
||||||
class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015.
|
class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015.
|
||||||
|
|
||||||
#elif __APPLE__
|
#elif defined(__APPLE__)
|
||||||
typedef std::u32string UTF32String;
|
typedef std::u32string UTF32String;
|
||||||
|
|
||||||
#define GUID_CFUUID
|
#define GUID_CFUUID
|
||||||
|
|
|
@ -24,7 +24,7 @@ namespace antlrcpp {
|
||||||
// Don't make the converter static or we have to serialize access to it.
|
// Don't make the converter static or we have to serialize access to it.
|
||||||
UTF32Converter converter;
|
UTF32Converter converter;
|
||||||
|
|
||||||
#if _MSC_VER >= 1900 && _MSC_VER < 2000
|
#if defined(_MSC_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000
|
||||||
auto p = reinterpret_cast<const int32_t *>(data.data());
|
auto p = reinterpret_cast<const int32_t *>(data.data());
|
||||||
return converter.to_bytes(p, p + data.size());
|
return converter.to_bytes(p, p + data.size());
|
||||||
#else
|
#else
|
||||||
|
@ -36,7 +36,7 @@ namespace antlrcpp {
|
||||||
{
|
{
|
||||||
UTF32Converter converter;
|
UTF32Converter converter;
|
||||||
|
|
||||||
#if _MSC_VER >= 1900 && _MSC_VER < 2000
|
#if defined(_MSC_VER) && _MSC_VER >= 1900 && _MSC_VER < 2000
|
||||||
auto r = converter.from_bytes(first, last);
|
auto r = converter.from_bytes(first, last);
|
||||||
i32string s = reinterpret_cast<const int32_t *>(r.data());
|
i32string s = reinterpret_cast<const int32_t *>(r.data());
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue