mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Another "long double" ...
This commit is contained in:
parent
b130d6be52
commit
820f41162e
1 changed files with 2 additions and 2 deletions
|
@ -571,7 +571,7 @@ Tree cast(Tree p, Type type) {
|
||||||
case UNSIGNED:
|
case UNSIGNED:
|
||||||
if (isfloat(dst)) {
|
if (isfloat(dst)) {
|
||||||
Type ssrc = signedint(src);
|
Type ssrc = signedint(src);
|
||||||
Tree two = cnsttree(longdouble, (long double)2.0);
|
Tree two = cnsttree(longdouble, (double)2.0);
|
||||||
p = (*optree['+'])(ADD,
|
p = (*optree['+'])(ADD,
|
||||||
(*optree['*'])(MUL,
|
(*optree['*'])(MUL,
|
||||||
two,
|
two,
|
||||||
|
@ -587,7 +587,7 @@ Tree cast(Tree p, Type type) {
|
||||||
case FLOAT:
|
case FLOAT:
|
||||||
if (isunsigned(dst)) {
|
if (isunsigned(dst)) {
|
||||||
Type sdst = signedint(dst);
|
Type sdst = signedint(dst);
|
||||||
Tree c = cast(cnsttree(longdouble, (long double)sdst->u.sym->u.limits.max.i + 1), src);
|
Tree c = cast(cnsttree(longdouble, (double)sdst->u.sym->u.limits.max.i + 1), src);
|
||||||
p = condtree(
|
p = condtree(
|
||||||
simplify(GE, src, p, c),
|
simplify(GE, src, p, c),
|
||||||
(*optree['+'])(ADD,
|
(*optree['+'])(ADD,
|
||||||
|
|
Loading…
Reference in a new issue