Fix MSVC builds

This commit is contained in:
Jacob Dufault 2017-11-29 19:18:58 -08:00
parent e421f86bfa
commit aeab1a0b79
2 changed files with 2 additions and 2 deletions

View File

@ -134,7 +134,7 @@ inline void Reflect(Writer& visitor, IndexFuncRef& value) {
s += "~";
// id.id is unsigned, special case 0 value
if (static_cast<ssize_t>(value.id.id) == -1) {
if (value.id.id == static_cast<size_t>(-1)) {
s += "-1";
} else {
s += std::to_string(value.id.id);

View File

@ -110,7 +110,7 @@ struct QueryFuncRef {
QueryLocation loc;
bool is_implicit = false;
bool has_id() const { return static_cast<ssize_t>(id_.id) != -1; }
bool has_id() const { return id_.id != static_cast<size_t>(-1); }
QueryFuncRef() {} // Do not use, needed for reflect.
QueryFuncRef(QueryFuncId id, QueryLocation loc, bool is_implicit)