~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/math/neg.h

  • Committer: Brian Aker
  • Date: 2010-12-24 07:53:15 UTC
  • mfrom: (2024.1.3 clean)
  • Revision ID: brian@tangent.org-20101224075315-qiwlw4rc1bwx1p2m
MergeĀ inĀ CAST.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
 
29
29
class Item_func_neg :public Item_func_num1
30
30
{
 
31
  bool _is_negative;
 
32
 
31
33
public:
32
 
  Item_func_neg(Item *a) :Item_func_num1(a) {}
 
34
  Item_func_neg(Item *a) :
 
35
    Item_func_num1(a),
 
36
    _is_negative(true)
 
37
  {}
 
38
 
33
39
  double real_op();
34
40
  int64_t int_op();
35
41
  my_decimal *decimal_op(my_decimal *);
38
44
  void fix_length_and_dec();
39
45
  void fix_num_length_and_dec();
40
46
  uint32_t decimal_precision() const { return args[0]->decimal_precision(); }
 
47
 
 
48
  bool negative() const
 
49
  {
 
50
    return _is_negative;
 
51
  }
41
52
};
42
53
 
43
54
} /* namespace drizzled */