[ https://issues.apache.org/jira/browse/DATASKETCHES-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Lee Rhodes reassigned DATASKETCHES-9: ------------------------------------- Assignee: Lee Rhodes > Remove c-style const casts in kll/ and common/ directories > ---------------------------------------------------------- > > Key: DATASKETCHES-9 > URL: https://issues.apache.org/jira/browse/DATASKETCHES-9 > Project: Apache Datasketches > Issue Type: Improvement > Reporter: Gabor Kaszab > Assignee: Lee Rhodes > Priority: Major > > I recently started integrating the Apache DataSketches C++ library into > Apache Impala and our build system (with clang tidy) found some casts where > the const-ness is casted away using c-style casts. The best practice would be > to use C++ style casts like const_cast in this case instead. > The code popping up in the report: > 1) > https://github.com/apache/incubator-datasketches-cpp/blob/762904bb168d44846c1fe4f178998c9a8a57ccba/common/include/serde.hpp#L53 > This can be a reinterpret_cast<char*>(const_cast<T*>(items)) > 2) > https://github.com/apache/incubator-datasketches-cpp/blob/762904bb168d44846c1fe4f178998c9a8a57ccba/kll/include/kll_sketch_impl.hpp#L381 > Note, fixing this will result that 2 lines below will pop up in the report, > fixing that will reveal the same error another 2 lines below, and so on. > This ticket focuses only on the kll/ and common/ folders of the C++ library > as my work was only touching those folders so I've only run the report on > them. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@datasketches.apache.org For additional commands, e-mail: dev-h...@datasketches.apache.org