~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.cc

  • Committer: lbieber
  • Date: 2010-10-05 21:14:30 UTC
  • mfrom: (1775.5.2 bug621331)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: lbieber@orisndriz08-20101005211430-xmy19fcls25swctl
Merge Billy - fix bug 621331 - Replace use of stringstream with boost::lexical_cast

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
 
 
22
21
#include "config.h"
 
22
#include <boost/lexical_cast.hpp>
23
23
#include "drizzled/field/enum.h"
24
24
#include "drizzled/error.h"
25
25
#include "drizzled/table.h"
110
110
 
111
111
  if (from <= 0 || (uint64_t) from > typelib->count)
112
112
  {
113
 
    /* Convert the integer to a string using stringstream */
114
 
    std::stringstream ss;
115
 
    std::string tmp;
116
 
    ss << from; ss >> tmp;
 
113
    /* Convert the integer to a string using boost::lexical_cast */
 
114
    std::string tmp(boost::lexical_cast<std::string>(from));
117
115
 
118
116
    my_error(ER_INVALID_ENUM_VALUE, MYF(ME_FATALERROR), tmp.c_str());
119
117
    return 1;