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

ASF GitHub Bot commented on MINIFICPP-676:
------------------------------------------

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

    https://github.com/apache/nifi-minifi-cpp/pull/440#discussion_r234005818
  
    --- Diff: extensions/http-curl/client/HTTPStream.cpp ---
    @@ -53,16 +53,16 @@ void HttpStream::seek(uint64_t offset) {
       throw std::exception();
     }
     
    -int HttpStream::writeData(std::vector<uint8_t> &buf, int buflen) {
    +int HttpStream::writeData(const std::vector<uint8_t> &buf, int buflen) {
       if ((int)buf.capacity() < buflen) {
         return -1;
       }
    -  return writeData(reinterpret_cast<uint8_t *>(&buf[0]), buflen);
    --- End diff --
    
    this fails on some compilers. I spent a long time and saw failures on older 
versions ( not sure if specifically this one ). Did this cause a specific bug? 
These are non const for a reason and that's to tell the caller that their data 
may change. You're making an assumption that it shouldn't be const. 


> Cleanup and fix serializable interface implementation
> -----------------------------------------------------
>
>                 Key: MINIFICPP-676
>                 URL: https://issues.apache.org/jira/browse/MINIFICPP-676
>             Project: NiFi MiNiFi C++
>          Issue Type: Improvement
>            Reporter: Arpad Boda
>            Assignee: Arpad Boda
>            Priority: Minor
>
> Serializable interface contains a couple of issues:
> Type-unsafe template functions
> Code duplication
> Needless functions
> The goal of this ticket is to make the interface cleaner and simpler. 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to