Changeset 12308 for trunk


Ignore:
Timestamp:
10/28/11 05:35:15 (13 years ago)
Author:
tbretz
Message:
Added specilized template to make sure we do not have to convert floats to ints
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

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

    r11735 r12308  
    357357
    358358    ostringstream stream;
    359     stream << (int64_t)t;
     359    stream << t;
    360360    ptr += sizeof(T);
     361
     362    return stream.str();
     363}
     364
     365template<char>
     366string Converter::GetString(const char* &ptr) const
     367{
     368    ostringstream stream;
     369    stream << (int64_t)*ptr;
     370    ptr += 1;
    361371
    362372    return stream.str();
     
    663673        for (int j=0; j<i->second.first; j++)
    664674        {
     675            cout << i->first.first->name()[0] << endl;
    665676            switch (i->first.first->name()[0])
    666677            {
  • trunk/FACT++/src/Converter.h

    r11712 r12308  
    5050    template<class T>
    5151        std::string GetString(const char *&data) const;
     52    template<char>
     53        std::string GetString(const char* &ptr) const;
    5254
    5355    template<class T>
Note: See TracChangeset for help on using the changeset viewer.