RTEMS Tools | Improve event record handling (!36)
Chris Johns (@chris)
gitlab at rtems.org
Wed Nov 13 01:23:46 UTC 2024
Chris Johns started a new discussion on trace/record/record-main-lttng.cc: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/merge_requests/36#note_114832
> }
>
> + std::unique_ptr<Filter> base64_filter;
> if (is_base64_encoded) {
> - client.AddFilter(new Base64Filter());
> + base64_filter.reset(new Base64Filter());
> + client.AddFilter(base64_filter.get());
> }
>
> - if (is_zlib_compressed) {
> #ifdef HAVE_ZLIB_H
> - client.AddFilter(new ZlibFilter());
> -#endif
> + std::unique_ptr<Filter> zlib_filter;
> + if (is_zlib_compressed) {
> + zlib_filter.reset(new ZlibFilter());
Why not use [std::make_unique](http://en.cppreference.com/w/cpp/memory/unique_ptr/make_unique)? I think C++ is better with no direct use of `new` and `delete`.
--
View it on GitLab: https://gitlab.rtems.org/rtems/tools/rtems-tools/-/merge_requests/36#note_114832
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20241113/defd9681/attachment-0001.htm>
More information about the bugs
mailing list