~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ref.cc

  • Committer: Brian Aker
  • Date: 2010-12-18 02:06:13 UTC
  • Revision ID: brian@tangent.org-20101218020613-8lxhcvsy812bu960
Formatting + remove default from switch/case.

Show diffs side-by-side

added added

removed removed

Lines of Context:
451
451
    switch (result_field->result_type()) {
452
452
    case INT_RESULT:
453
453
      return result_field->val_int() != 0;
 
454
 
454
455
    case DECIMAL_RESULT:
455
 
    {
456
 
      my_decimal decimal_value;
457
 
      my_decimal *val= result_field->val_decimal(&decimal_value);
458
 
      if (val)
459
 
        return !my_decimal_is_zero(val);
460
 
      return 0;
461
 
    }
 
456
      {
 
457
        my_decimal decimal_value;
 
458
        my_decimal *val= result_field->val_decimal(&decimal_value);
 
459
        if (val)
 
460
          return !my_decimal_is_zero(val);
 
461
        return 0;
 
462
      }
 
463
 
462
464
    case REAL_RESULT:
463
465
    case STRING_RESULT:
464
466
      return result_field->val_real() != 0.0;
 
467
 
465
468
    case ROW_RESULT:
466
 
    default:
467
469
      assert(0);
468
470
    }
469
471
  }
 
472
 
470
473
  return val_bool();
471
474
}
472
475