Changeset 476 for trunk


Ignore:
Timestamp:
Jul 10, 2006 1:07:23 PM (18 years ago)
Author:
nkissebe
Message:

std::string *list[listLen] is not allowed by ISO C++ and enforced by Microsoft C++ (2005). Rewrote to dynamically allocate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/RpLibrary.cc

    r444 r476  
    322322    int index = 0;
    323323    int listLen = (path.length()/2)+1;
    324     std::string* list[listLen];
     324    std::string** list;
    325325    int path_size = 0;
    326326    int listIdx = 0;
     
    340340        return tmpElement;
    341341    }
     342
     343    list = (std::string **) calloc(listLen, sizeof( std::string * ) );
    342344
    343345    if (!list) {
     
    466468        }
    467469
    468         // should we really be freeing list since its on the stack as a fxn variable?
    469         // free(list);
    470         // list = NULL;
     470        free(list);
     471        list = NULL;
    471472    }
    472473
Note: See TracChangeset for help on using the changeset viewer.