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

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

pivotal-jbarrett commented on a change in pull request #165: GEODE-3288: 
Converts CacheableString to std::string.
URL: https://github.com/apache/geode-native/pull/165#discussion_r155603736
 
 

 ##########
 File path: cppcache/src/PdxInstanceImpl.cpp
 ##########
 @@ -229,22 +225,13 @@ void 
PdxInstanceImpl::writeField(std::shared_ptr<PdxWriter> writer,
           dynamic_cast<CacheableStringArray*>(value.get());
       if (val != nullptr) {
         int size = val->length();
-        if (val->operator[](0)->isCString()) {
-          char** strings = new char*[size];
-          for (int item = 0; item < size; item++) {
-            strings[item] = const_cast<char*>(val->operator[](item)->asChar());
-          }
-          writer->writeStringArray(fieldName, strings, size);
-          delete[] strings;
-        } else if (val->operator[](0)->isWideString()) {
-          wchar_t** strings = new wchar_t*[size];
-          for (int item = 0; item < size; item++) {
-            strings[item] =
-                const_cast<wchar_t*>(val->operator[](item)->asWChar());
-          }
-          writer->writeWideStringArray(fieldName, strings, size);
-          delete[] strings;
+        char** strings = new char*[size];
 
 Review comment:
   Probably but out of scope with this ticket. Was thinking of writing tickets 
to replace CacheableArray/WriteArray/ReadArray with vector since vector behaves 
more like Java arrays from which these come.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Replace char* with std::string
> ------------------------------
>
>                 Key: GEODE-3288
>                 URL: https://issues.apache.org/jira/browse/GEODE-3288
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Ernest Burghardt
>
> In all public API headers



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

Reply via email to