[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [lmi-commits] master 4c21bf7 6/6: Replace shared_ptr with uniq
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] [lmi-commits] master 4c21bf7 6/6: Replace shared_ptr with unique_ptr |
Date: |
Tue, 16 Oct 2018 15:44:14 +0200 |
On Tue, 16 Oct 2018 09:19:10 -0400 (EDT) Greg Chicares <address@hidden> wrote:
GC> branch: master
GC> commit 4c21bf7c272d1ace6f2c45e40cebf127c2c62703
GC> Author: Gregory W. Chicares <address@hidden>
GC> Commit: Gregory W. Chicares <address@hidden>
GC>
GC> Replace shared_ptr with unique_ptr
GC> ---
GC> emit_ledger.hpp | 6 +++---
GC> group_quote_pdf_gen.cpp | 2 +-
GC> group_quote_pdf_gen.hpp | 6 +++---
GC> group_quote_pdf_gen_wx.cpp | 13 ++++++-------
GC> 4 files changed, 13 insertions(+), 14 deletions(-)
GC>
GC> diff --git a/emit_ledger.hpp b/emit_ledger.hpp
GC> index d04d98e..e1f90fb 100644
GC> --- a/emit_ledger.hpp
GC> +++ b/emit_ledger.hpp
GC> @@ -24,14 +24,14 @@
GC>
GC> #include "config.hpp"
GC>
GC> +#include "group_quote_pdf_gen.hpp" // [required for unique_ptr<>]
I'd just like to notice that this header is only required here because of
the inline definition of dtor of ledger_emitter, which has a
unique_ptr<group_quote_pdf_gen> member, in this file:
~ledger_emitter() = default;
If we just declared the dtor here but moved its definition to
emit_ledger.cpp, it wouldn't require including group_quote_pdf_gen.hpp
from this header.
Of course, in practice this probably doesn't make much difference as
group_quote_pdf_gen.hpp doesn't change often, so including it shouldn't
result in recompiling more files, but it might be still better to avoid the
not-really-required header inclusion from general tidiness point of view.
Regards,
VZ
- Re: [lmi] [lmi-commits] master 4c21bf7 6/6: Replace shared_ptr with unique_ptr,
Vadim Zeitlin <=