~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/field.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:
323
323
  switch (result_field->result_type()) {
324
324
  case INT_RESULT:
325
325
    return result_field->val_int() != 0;
 
326
 
326
327
  case DECIMAL_RESULT:
327
 
  {
328
 
    my_decimal decimal_value;
329
 
    my_decimal *val= result_field->val_decimal(&decimal_value);
330
 
    if (val)
331
 
      return !my_decimal_is_zero(val);
332
 
    return 0;
333
 
  }
 
328
    {
 
329
      my_decimal decimal_value;
 
330
      my_decimal *val= result_field->val_decimal(&decimal_value);
 
331
      if (val)
 
332
        return !my_decimal_is_zero(val);
 
333
      return 0;
 
334
    }
 
335
 
334
336
  case REAL_RESULT:
335
337
  case STRING_RESULT:
336
338
    return result_field->val_real() != 0.0;
 
339
 
337
340
  case ROW_RESULT:
338
 
  default:
339
341
    assert(0);
340
342
    return 0;                                   // Shut up compiler
341
343
  }
 
344
 
 
345
  assert(0);
 
346
  return 0;                                   // Shut up compiler
342
347
}
343
348
 
344
349