Github user dgkimura commented on a diff in the pull request:

    https://github.com/apache/geode-native/pull/107#discussion_r126028200
  
    --- Diff: src/cppcache/integration-test/testThinClientRemoteQuerySS.cpp ---
    @@ -56,59 +57,63 @@ const wchar_t* checkNullString(const wchar_t* str) {
       return ((str == nullptr) ? L"(null)" : str);
     }
     
    +std::string checkNullString(const std::string* str) {
    +    return ((str == nullptr) ? "(null)" : *str);
    +}
    +
     void _printFields(CacheablePtr field, Struct* ssptr, int32_t& fields) {
       if (auto portfolio = std::dynamic_pointer_cast<Portfolio>(field)) {
         printf("   pulled %s :- ID %d, pkid %s\n",
    -           checkNullString(ssptr->getFieldName(fields)), 
portfolio->getID(),
    +           checkNullString(ssptr->getFieldName(fields)).c_str(), 
portfolio->getID(),
    --- End diff --
    
    If we can make `getFieldName` return `std::string` then I'd think we can 
just `+` concatenate the strings without having to do `checkNullString` and  
`c_str()`.


---
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