~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/date.h

  • Committer: Andrey Hristov
  • Date: 2008-08-06 00:04:45 UTC
  • mto: (264.1.5 codestyle)
  • mto: This revision was merged to the branch mainline in revision 266.
  • Revision ID: ahristov@mysql.com-20080806000445-84urmltikgwk9v5d
Constify the usage of CHARSET_INFO almost to the last place in the code.
99% of the parameters are const CHARSET_INFO * const cs.
Wherever possible stack variables are also double consted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
public:
28
28
  Field_newdate(uchar *ptr_arg, uchar *null_ptr_arg, uchar null_bit_arg,
29
29
                enum utype unireg_check_arg, const char *field_name_arg,
30
 
                CHARSET_INFO *cs)
 
30
                const CHARSET_INFO * const cs)
31
31
    :Field_str(ptr_arg, 10, null_ptr_arg, null_bit_arg,
32
32
               unireg_check_arg, field_name_arg, cs)
33
33
    {}
34
34
  Field_newdate(bool maybe_null_arg, const char *field_name_arg,
35
 
                CHARSET_INFO *cs)
 
35
                const CHARSET_INFO * const cs)
36
36
    :Field_str((uchar*) 0,10, maybe_null_arg ? (uchar*) "": 0,0,
37
37
               NONE, field_name_arg, cs) {}
38
38
  enum_field_types type() const { return DRIZZLE_TYPE_NEWDATE;}
39
39
  enum_field_types real_type() const { return DRIZZLE_TYPE_NEWDATE; }
40
40
  enum ha_base_keytype key_type() const { return HA_KEYTYPE_UINT24; }
41
41
  enum Item_result cmp_type () const { return INT_RESULT; }
42
 
  int  store(const char *to,uint length,CHARSET_INFO *charset);
 
42
  int  store(const char *to,uint length, const CHARSET_INFO * const charset);
43
43
  int  store(double nr);
44
44
  int  store(int64_t nr, bool unsigned_val);
45
45
  int store_time(DRIZZLE_TIME *ltime, timestamp_type type);