~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/divide.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:
86
86
{
87
87
  prec_increment= current_session->variables.div_precincrement;
88
88
  Item_num_op::fix_length_and_dec();
89
 
  switch(hybrid_type) {
 
89
 
 
90
  switch(hybrid_type)
 
91
  {
90
92
  case REAL_RESULT:
91
93
  {
92
 
    decimals=cmax(args[0]->decimals,args[1]->decimals)+prec_increment;
 
94
    decimals= max(args[0]->decimals,args[1]->decimals)+prec_increment;
93
95
    set_if_smaller(decimals, NOT_FIXED_DEC);
94
 
    max_length=args[0]->max_length - args[0]->decimals + decimals;
95
 
    uint32_t tmp=float_length(decimals);
 
96
    max_length= args[0]->max_length - args[0]->decimals + decimals;
 
97
    uint32_t tmp= float_length(decimals);
96
98
    set_if_smaller(max_length,tmp);
97
99
    break;
98
100
  }