~dshrews/drizzle/bug656474

« back to all changes in this revision

Viewing changes to drizzled/function/time/from_days.cc

  • Committer: lbieber
  • Date: 2010-10-05 22:23:12 UTC
  • mfrom: (1813.1.4 build)
  • Revision ID: lbieber@orisndriz08-20101005222312-weuq0ardk3gcryau
Merge Travis - 621861 - convert structs to classes
Merge Billy - 621331 - Replace use of stringstream with boost::lexical_cast
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle
Merge Andrew - fix bug 653300 - Syntax error on inport of a SQL file produced by drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
 
21
#include <boost/lexical_cast.hpp>
21
22
#include "drizzled/function/time/from_days.h"
22
23
#include "drizzled/error.h"
23
24
#include "drizzled/temporal.h"
54
55
  if (! to.from_julian_day_number(int_value))
55
56
  {
56
57
    /* Bad input, throw an error */
57
 
    std::stringstream ss;
58
 
    std::string tmp;
59
 
    ss << int_value; ss >> tmp;
 
58
    std::string tmp(boost::lexical_cast<std::string>(int_value));
60
59
 
61
60
    my_error(ER_ARGUMENT_OUT_OF_RANGE, MYF(ME_FATALERROR), tmp.c_str(), func_name());
62
61
    return false;