mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Get rid of DtoBoolean - use DtoCast(... Type::tbool) instead.
Fixed some casts to bool that were using truncation.
This commit is contained in:
@@ -454,6 +454,9 @@ DValue* DtoCastComplex(Loc& loc, DValue* val, Type* _to)
|
||||
DImValue* re = new DImValue(to, repart);
|
||||
return DtoCastFloat(loc, re, to);
|
||||
}
|
||||
else if (to->ty == Tbool) {
|
||||
return new DImValue(_to, DtoComplexEquals(loc, TOKnotequal, val, DtoNullValue(vty)));
|
||||
}
|
||||
else
|
||||
assert(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user