Changeset 11484


Ignore:
Timestamp:
07/20/11 10:27:47 (13 years ago)
Author:
tbretz
Message:
Added a specialized template of SendCommand, suitable to send a string
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Dim.h

    r11003 r11484  
    5353        inline bool SendCommand(const std::string &command, const T &t)
    5454    {
    55         return DimClient::sendCommand(command.c_str(), (void*)&t, sizeof(t));
     55        return DimClient::sendCommand(command.c_str(), const_cast<T*>(&t), sizeof(t));
     56    }
     57
     58    template<>
     59        inline bool SendCommand(const std::string &command, const std::string &t)
     60    {
     61        return DimClient::sendCommand(command.c_str(), const_cast<char*>(t.c_str()), t.length()+1);
    5662    }
    5763
Note: See TracChangeset for help on using the changeset viewer.