~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/my_decimal.h

  • Committer: Stewart Smith
  • Date: 2009-03-18 00:29:24 UTC
  • mto: (942.1.10 mordred)
  • mto: This revision was merged to the branch mainline in revision 945.
  • Revision ID: stewart@flamingspork.com-20090318002924-gixoh4t5mhbw8qyz
make set_if_bigger typesafe for C and C++. Fix up everywhere.

Show diffs side-by-side

added added

removed removed

Lines of Context:
172
172
inline uint32_t my_decimal_precision_to_length(uint32_t precision, uint8_t scale,
173
173
                                             bool unsigned_flag)
174
174
{
175
 
  set_if_smaller(precision, DECIMAL_MAX_PRECISION);
 
175
  set_if_smaller(precision, (uint32_t)DECIMAL_MAX_PRECISION);
176
176
  return (uint32_t)(precision + (scale>0 ? 1:0) + (unsigned_flag ? 0:1));
177
177
}
178
178