Ignore:
Timestamp:
07/19/11 21:03:37 (13 years ago)
Author:
tbretz
Message:
Replaces ato/atof by stoi/stof; replaced boost::lexical_cast by to_string
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Configuration.cc

    r11478 r11479  
    285285   }
    286286
    287 template<class T, class S> // Needed by the lexical_cast to convert the option
     287template<class T, class S> // Needed to convert the option
    288288   std::istream &operator>>(std::istream &in,  pair<T,S> &f)
    289289   {
     
    335335#include <boost/regex.hpp>
    336336#include <boost/filesystem.hpp>
    337 #include <boost/lexical_cast.hpp>
    338337
    339338#define HAS_SQL
     
    420419    const string server = what[5];
    421420    const string db     = what[9];
    422     const int port      = atoi(string(what[7]).c_str());
     421    const int port      = stoi(string(what[7]));
    423422
    424423    cout << "Connecting to '";
     
    624623
    625624    if (v.value().type()==typeid(int16_t))
    626         return boost::lexical_cast<string>(v.as<int16_t>());
     625        return to_string((long long int)v.as<int16_t>());
    627626
    628627    if (v.value().type()==typeid(int32_t))
    629         return boost::lexical_cast<string>(v.as<int32_t>());
     628        return to_string((long long int)v.as<int32_t>());
    630629
    631630    if (v.value().type()==typeid(int64_t))
    632         return boost::lexical_cast<string>(v.as<int64_t>());
     631        return to_string((long long int)v.as<int64_t>());
    633632
    634633    if (v.value().type()==typeid(uint16_t))
    635         return boost::lexical_cast<string>(v.as<uint16_t>());
     634        return to_string((long long unsigned int)v.as<uint16_t>());
    636635
    637636    if (v.value().type()==typeid(uint32_t))
    638         return boost::lexical_cast<string>(v.as<uint32_t>());
     637        return to_string((long long unsigned int)v.as<uint32_t>());
    639638
    640639    if (v.value().type()==typeid(uint64_t))
    641         return boost::lexical_cast<string>(v.as<uint64_t>());
     640        return to_string((long long unsigned int)v.as<uint64_t>());
    642641
    643642    if (v.value().type()==typeid(float))
    644         return boost::lexical_cast<string>(v.as<float>());
     643        return to_string((long double)v.as<float>());
    645644
    646645    if (v.value().type()==typeid(double))
    647         return boost::lexical_cast<string>(v.as<double>());
     646        return to_string((long double)v.as<double>());
    648647
    649648    if (v.value().type()==typeid(vector<string>))
Note: See TracChangeset for help on using the changeset viewer.