~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/float.cc

  • Committer: Monty Taylor
  • Date: 2011-03-10 18:09:05 UTC
  • mfrom: (2225.2.2 refactor)
  • mto: This revision was merged to the branch mainline in revision 2228.
  • Revision ID: mordred@inaugust.com-20110310180905-ttx05t7q7ff6nl7c
Merge Olad: Refactoring

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18
18
 */
19
19
 
20
 
#include "config.h"
 
20
#include <config.h>
 
21
 
21
22
#include <math.h>
 
23
 
22
24
#include <drizzled/error.h>
 
25
#include <drizzled/field.h>
 
26
#include <drizzled/item/float.h>
23
27
#include <drizzled/item/num.h>
24
28
#include <drizzled/item/string.h>
25
 
#include <drizzled/item/float.h>
26
29
 
27
30
namespace drizzled
28
31
{
74
77
  return (int64_t) rint(value);
75
78
}
76
79
 
77
 
my_decimal *Item_float::val_decimal(my_decimal *decimal_value)
 
80
type::Decimal *Item_float::val_decimal(type::Decimal *decimal_value)
78
81
{
79
82
  // following assert is redundant, because fixed=1 assigned in constructor
80
83
  assert(fixed == 1);
81
 
  double2my_decimal(E_DEC_FATAL_ERROR, value, decimal_value);
 
84
  double2_class_decimal(E_DEC_FATAL_ERROR, value, decimal_value);
82
85
  return (decimal_value);
83
86
}
84
87
 
118
121
}
119
122
 
120
123
 
121
 
void Item_float::print(String *str, enum_query_type)
 
124
void Item_float::print(String *str)
122
125
{
123
126
  if (presentation)
124
127
  {