Skip to content

Commit

Permalink
ETL::surface_: when returning a value_type, first cast the accumulato…
Browse files Browse the repository at this point in the history
…r type to it.
  • Loading branch information
genete committed Oct 24, 2012
1 parent 18900f8 commit f8b92c3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ETL/ETL/_surface.h
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ class surface
if(e>=epsilon)ret+=(*this)[v][u+1]*e;
if(f>=epsilon)ret+=(*this)[v+1][u]*f;
if(g>=epsilon)ret+=(*this)[v+1][u+1]*g;
return ret;
return (value_type)(ret);
}

//! Cosine sample
Expand Down Expand Up @@ -491,7 +491,7 @@ class surface
if(f>=epsilon)ret+=(*this)[v+1][u]*f;
if(g>=epsilon)ret+=(*this)[v+1][u+1]*g;

return ret;
return (value_type)(ret);
}

//! Cubic sample
Expand Down Expand Up @@ -619,7 +619,7 @@ class surface
}

//return the cumulative column evaluation
return xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3];
return (value_type)(xfa[0]*tyf[0] + xfa[1]*tyf[1] + xfa[2]*tyf[2] + xfa[3]*tyf[3]);
#undef f
}

Expand Down Expand Up @@ -754,7 +754,7 @@ class surface
}

acum *= 1/weight;
return acum;
return (value_type)(acum);
}

//! Rectangle sample clipped
Expand Down Expand Up @@ -926,7 +926,7 @@ class surface
}

acum *= 1/weight;
return acum;
return (value_type)(acum);
}
};

Expand Down

0 comments on commit f8b92c3

Please sign in to comment.