~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/decimal.cc

  • 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:
42
42
             unireg_check_arg, field_name_arg, dec_arg, zero_arg, unsigned_arg)
43
43
{
44
44
  precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg);
45
 
  set_if_smaller(precision, DECIMAL_MAX_PRECISION);
 
45
  set_if_smaller(precision, (uint32_t)DECIMAL_MAX_PRECISION);
46
46
  assert((precision <= DECIMAL_MAX_PRECISION) &&
47
47
              (dec <= DECIMAL_MAX_SCALE));
48
48
  bin_size= my_decimal_get_binary_size(precision, dec);
59
59
             NONE, name, dec_arg, 0, unsigned_arg)
60
60
{
61
61
  precision= my_decimal_length_to_precision(len_arg, dec_arg, unsigned_arg);
62
 
  set_if_smaller(precision, DECIMAL_MAX_PRECISION);
 
62
  set_if_smaller(precision, (uint32_t)DECIMAL_MAX_PRECISION);
63
63
  assert((precision <= DECIMAL_MAX_PRECISION) &&
64
64
              (dec <= DECIMAL_MAX_SCALE));
65
65
  bin_size= my_decimal_get_binary_size(precision, dec);