Corretti cast funzionali

git-svn-id: svn://10.65.10.50/trunk@387 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1994-10-14 18:47:26 +00:00
parent 3617cccc6a
commit 8a2c77f75c

View File

@ -373,7 +373,7 @@ word Pagamento::recalc_rate(int row, bool is_perc_modified,
if (new_value != NULL)
{
newv = new_value;
rmax = is_perc_modified? real(100.0) : (_tpr == 0 ? _firstr : _secndr);
rmax = is_perc_modified? (real) 100.0 : (_tpr == 0 ? _firstr : _secndr);
if (newv > rmax) return P_RSUM;
}
@ -479,8 +479,8 @@ word Pagamento::recalc_rate(int row, bool is_perc_modified,
for(int j = row+1; j < srate.items(); j++)
_rate.add(NULL,j);
TToken_string& trt = add_rata(is_perc_modified? remainder : real(0.0),
oldscad, oldtype);
TToken_string& trt = add_rata(is_perc_modified ? remainder : (real) 0.0,
oldscad, oldtype);
if (!is_perc_modified) trt.add(remainder.string(),4);
if (_inited)
{
@ -619,7 +619,10 @@ word Pagamento::recalc_rate(int row, bool is_perc_modified,
if (rdiff == 2) rdiff = 1;
_rdiff = FALSE;
}
rsum += is_perc_modified ? perc_rata(i) : tpay_rata(i);
if (is_perc_modified)
rsum += perc_rata(i);
else
rsum += tpay_rata(i);
lastdate = data_rata(i);
oldtype = tipo_rata(i);
@ -691,7 +694,7 @@ bool Pagamento::read(TTable* t, TTable* r)
tt->add((const char*)d);
tt->add("");
tt->add(r->get("S1"));
_slicer.add(real(r->get("R0")));
_slicer.add((real)r->get("R0"));
_rate.add(tt);
}