[ 
https://issues.apache.org/jira/browse/GEODE-3019?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16077272#comment-16077272
 ] 

ASF GitHub Bot commented on GEODE-3019:
---------------------------------------

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

    https://github.com/apache/geode-native/pull/107#discussion_r126030201
  
    --- 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 --
    
    That is a good idea.  There are 3 versions of checkNullString and it's test 
code so we minimized changes here in the tests...


> Refactor Struct
> ---------------
>
>                 Key: GEODE-3019
>                 URL: https://issues.apache.org/jira/browse/GEODE-3019
>             Project: Geode
>          Issue Type: Task
>          Components: native client
>            Reporter: Jacob S. Barrett
>
> Refactor Struct (geode/Struct.hpp):
> * Replace {{char *}} with {{std::string}}
> * Replace {{m_fieldname}} type with {{std::unordered_map<std::string, 
> int32_t>}}
> * Add vector for index to field name lookup.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to