~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.cc

  • Committer: Monty Taylor
  • Date: 2011-02-13 17:24:18 UTC
  • mfrom: (2159.1.1 remove-lint)
  • mto: This revision was merged to the branch mainline in revision 2166.
  • Revision ID: mordred@inaugust.com-20110213172418-vd210j88hiwk8jih
Removed the lint stuff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
 */
20
20
 
21
 
#include <config.h>
 
21
#include "config.h"
22
22
#include <boost/lexical_cast.hpp>
23
 
#include <drizzled/field/enum.h>
24
 
#include <drizzled/error.h>
25
 
#include <drizzled/table.h>
26
 
#include <drizzled/session.h>
27
 
#include <drizzled/strfunc.h>
28
 
#include <drizzled/typelib.h>
 
23
#include "drizzled/field/enum.h"
 
24
#include "drizzled/error.h"
 
25
#include "drizzled/table.h"
 
26
#include "drizzled/session.h"
 
27
#include "drizzled/strfunc.h"
29
28
 
30
29
#include <sstream>
31
30
#include <string>
66
65
 
67
66
  /* Remove end space */
68
67
  length= field_charset->cset->lengthsp(field_charset, from, length);
69
 
  tmp= typelib->find_type2(from, length, field_charset);
 
68
  tmp= find_type2(typelib, from, length, field_charset);
70
69
  if (! tmp)
71
70
  {
72
71
    if (length < 6) /* Can't be more than 99999 enums */
121
120
  return 0;
122
121
}
123
122
 
124
 
double Field_enum::val_real(void) const
 
123
double Field_enum::val_real(void)
125
124
{
126
125
  return (double) Field_enum::val_int();
127
126
}
128
127
 
129
 
int64_t Field_enum::val_int(void) const
 
128
int64_t Field_enum::val_int(void)
130
129
{
131
130
  ASSERT_COLUMN_MARKED_FOR_READ;
132
131
 
140
139
  return ((int64_t) tmp) + 1; /* SQL is from 1, we store from 0 */
141
140
}
142
141
 
143
 
String *Field_enum::val_str(String *, String *val_ptr) const
 
142
String *Field_enum::val_str(String *, String *val_ptr)
144
143
{
145
144
  uint32_t tmp=(uint32_t) Field_enum::val_int();
146
145