Github user pivotal-jbarrett commented on a diff in the pull request:

    https://github.com/apache/geode-native/pull/6#discussion_r100956809
  
    --- Diff: src/cppcache/integration-test/CacheHelper.cpp ---
    @@ -1382,6 +1377,31 @@ void 
CacheHelper::createDuplicateXMLFile(std::string& originalFile,
              CacheHelper::staticConfigFileList.size());
     }
     
    +void CacheHelper::replacePortsInFile(int hostPort1, int hostPort2,
    +                                     int hostPort3, int hostPort4, int 
locPort1,
    +                                     int locPort2, const std::string& 
inFile,
    +                                     const std::string& outFile) {
    +  std::ifstream in(inFile, std::ios::in | std::ios::binary);
    +  if (in) {
    +    std::string contents;
    +    in.seekg(0, std::ios::end);
    +    contents.resize(in.tellg());
    --- End diff --
    
    I think you want `reserve()`. `resize()` causes the string to be resized 
and initialized with `CharT()`. `reserve()` just allocates enough capacity but 
does not resize or initialize the string.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to