~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/boolean.h

  • Committer: Olaf van der Spek
  • Date: 2011-07-05 09:52:28 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110705095228-y4aejvsuyeezloqe
Refactor Items

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
  {
44
44
    max_length= value ? 4 : 5;
45
45
    fixed= true;
46
 
 
47
 
    if (value)
48
 
    {
49
 
      name= const_cast<char *>("TRUE");
50
 
    }
51
 
    else
52
 
    {
53
 
      name= const_cast<char *>("FALSE");
54
 
    }
 
46
    name= value ? "TRUE" : "FALSE";
55
47
  }
56
48
 
57
49
  enum Type type() const { return BOOLEAN_ITEM; }
74
66
  drizzled::String* val_str(drizzled::String *value_buffer)
75
67
  {
76
68
    value_buffer->realloc(5);
77
 
 
78
 
    if (value)
79
 
    {
80
 
      value_buffer->append("TRUE");
81
 
    }
82
 
    else
83
 
    {
84
 
      value_buffer->append("FALSE");
85
 
    }
86
 
 
 
69
    value_buffer->append(value ? "TRUE" : "FALSE");
87
70
    return value_buffer;
88
71
  }
89
72