~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field/enum.cc

  • Committer: earney
  • Date: 2010-09-20 22:29:50 UTC
  • mto: (1813.1.3 build)
  • mto: This revision was merged to the branch mainline in revision 1814.
  • Revision ID: earney@earney.homedns.org-20100920222950-evtw5u0vzlxt31qh
modified files containing stringstream to use boost:lexical_cast instead as 
requested in bug 621331

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"
132
132
  if (from <= 0 || (uint64_t) from > typelib->count)
133
133
  {
134
134
    /* Convert the integer to a string using stringstream */
135
 
    std::stringstream ss;
136
 
    std::string tmp;
137
 
    ss << from; ss >> tmp;
 
135
    //std::stringstream ss;
 
136
    //std::string tmp;
 
137
    //ss << from; ss >> tmp;
 
138
    std::string tmp(boost::lexical_cast<std::string>(from));
138
139
 
139
140
    my_error(ER_INVALID_ENUM_VALUE, MYF(ME_FATALERROR), tmp.c_str());
140
141
    return 1;