~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/fdecimal.cc

  • 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:
134
134
 
135
135
 
136
136
int Field_new_decimal::store(const char *from, uint length,
137
 
                             CHARSET_INFO *charset_arg)
 
137
                             const CHARSET_INFO * const charset_arg)
138
138
{
139
139
  int err;
140
140
  my_decimal decimal_value;
304
304
 
305
305
void Field_new_decimal::sql_type(String &str) const
306
306
{
307
 
  CHARSET_INFO *cs= str.charset();
 
307
  const CHARSET_INFO * const cs= str.charset();
308
308
  str.length(cs->cset->snprintf(cs, (char*) str.ptr(), str.alloced_length(),
309
309
                                "decimal(%d,%d)", precision, (int)dec));
310
310
  add_unsigned(str);