~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/additive_op.cc

  • Committer: Nathan Williams
  • Date: 2009-06-24 18:16:14 UTC
  • mto: This revision was merged to the branch mainline in revision 1082.
  • Revision ID: nathanlws@gmail.com-20090624181614-cju6aaqmn2u5w2nw
Converted all usages of cmax in drizzled/field/ and drizzled/function/ to std::max.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
*/
31
31
void Item_func_additive_op::result_precision()
32
32
{
33
 
  decimals= cmax(args[0]->decimals, args[1]->decimals);
34
 
  int max_int_part= cmax(args[0]->decimal_precision() - args[0]->decimals,
35
 
                         args[1]->decimal_precision() - args[1]->decimals);
 
33
  decimals= max(args[0]->decimals, args[1]->decimals);
 
34
  int max_int_part= max(args[0]->decimal_precision() - args[0]->decimals,
 
35
                        args[1]->decimal_precision() - args[1]->decimals);
36
36
  int precision= min(max_int_part + 1 + decimals, DECIMAL_MAX_PRECISION);
37
37
 
38
38
  /* Integer operations keep unsigned_flag if one of arguments is unsigned */