Ignore:
Timestamp:
Jul 9, 2009, 10:38:53 AM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
bd86e8
Parents:
669a7e
Message:

fixed compiler warning: deprecated conversion from string const to char * by changed char* to const char*

  • "hello" represents a const char *. Hence, if we point a char* at it, it may subsequently be altered, which is not allowed due to its const nature. Hence, the warning. However, we do not change the strings anyway, hence changing to const char *.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/parser.cpp

    r669a7e rc12297  
    208208 * \return parsing successful
    209209 */
    210 bool MatrixContainer::ParseFragmentMatrix(char *name, char *prefix, string suffix, int skiplines, int skipcolumns)
     210bool MatrixContainer::ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns)
    211211{
    212212        char filename[1023];
     
    258258 * \return Allocation successful
    259259 */
    260 bool MatrixContainer::AllocateMatrix(char *GivenHeader, int MCounter, int *RCounter, int CCounter)
     260bool MatrixContainer::AllocateMatrix(const char *GivenHeader, int MCounter, int *RCounter, int CCounter)
    261261{
    262262        Header = (char *) Malloc(sizeof(char)*1024, "MatrixContainer::ParseFragmentMatrix: *EnergyHeader");
     
    516516 * \return parsing successful
    517517 */
    518 bool EnergyMatrix::ParseFragmentMatrix(char *name, char *prefix, string suffix, int skiplines, int skipcolumns)
     518bool EnergyMatrix::ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns)
    519519{
    520520        char filename[1024];
     
    548548 * \return parsing successful
    549549 */
    550 bool ForceMatrix::ParseIndices(char *name)
     550bool ForceMatrix::ParseIndices(const char *name)
    551551{
    552552        ifstream input;
     
    626626 * \return parsing successful
    627627 */
    628 bool ForceMatrix::ParseFragmentMatrix(char *name, char *prefix, string suffix, int skiplines, int skipcolumns)
     628bool ForceMatrix::ParseFragmentMatrix(const char *name, const char *prefix, string suffix, int skiplines, int skipcolumns)
    629629{
    630630        char filename[1023];
Note: See TracChangeset for help on using the changeset viewer.