~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_string.cc

  • Committer: Monty Taylor
  • Date: 2009-12-27 06:31:41 UTC
  • mfrom: (1241.16.2 fix-gcc-warnings)
  • mto: This revision was merged to the branch mainline in revision 1258.
  • Revision ID: mordred@inaugust.com-20091227063141-p9dw8271qjvb98qe
Some GCC warnings fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
*****************************************************************************/
33
33
 
34
34
String::String()
35
 
  : Ptr(0),
 
35
  : Ptr(NULL),
36
36
    str_length(0),
37
37
    Alloced_length(0),
38
 
    alloced(0),
 
38
    alloced(false),
39
39
    str_charset(&my_charset_bin)
40
40
{ }
41
41
 
 
42
 
42
43
String::String(uint32_t length_arg)
43
 
  : Ptr(0),
 
44
  : Ptr(NULL),
44
45
    str_length(0),
45
46
    Alloced_length(0),
46
 
    alloced(0),
 
47
    alloced(false),
47
48
    str_charset(&my_charset_bin)
48
49
{
49
50
  (void) real_alloc(length_arg);
50
51
}
51
52
 
 
53
 
52
54
String::String(const char *str, const CHARSET_INFO * const cs)
53
 
  : Ptr(const_cast<char*>(str)),
 
55
  : Ptr(const_cast<char *>(str)),
54
56
    str_length(static_cast<uint32_t>(strlen(str))),
55
57
    Alloced_length(0),
56
 
    alloced(0),
 
58
    alloced(false),
57
59
    str_charset(cs)
58
60
{ }
59
61
 
60
62
String::String(const char *str, uint32_t len, const CHARSET_INFO * const cs)
61
 
  : Ptr(const_cast<char*>(str)),
 
63
  : Ptr(const_cast<char *>(str)),
62
64
    str_length(len),
63
65
    Alloced_length(0),
64
 
    alloced(0),
 
66
    alloced(false),
65
67
    str_charset(cs)
66
68
{ }
67
69
 
68
 
String::String(char *str,uint32_t len, const CHARSET_INFO * const cs)
 
70
 
 
71
String::String(char *str, uint32_t len, const CHARSET_INFO * const cs)
69
72
  : Ptr(str),
70
73
    str_length(len),
71
74
    Alloced_length(len),
72
 
    alloced(0),
 
75
    alloced(false),
73
76
    str_charset(cs)
74
77
{ }
75
78
 
 
79
 
76
80
String::String(const String &str)
77
81
  : Ptr(str.Ptr),
78
82
    str_length(str.str_length),
79
83
    Alloced_length(str.Alloced_length),
80
 
    alloced(0),
 
84
    alloced(false),
81
85
    str_charset(str.str_charset)
82
86
{ }
83
87
 
 
88
 
84
89
void *String::operator new(size_t size, MEM_ROOT *mem_root)
85
90
{
86
91
  return alloc_root(mem_root, static_cast<uint32_t>(size));