On 10/5/20 12:19 PM, Jean-Marc Lasgouttes wrote: > Le 05/10/2020 à 17:50, José Abílio Matos a écrit : >> On Monday, October 5, 2020 2:13:35 PM WEST Jean-Marc Lasgouttes wrote: >>> Yes, clang 10 does >>> >>> JMarc >> >> BTW compiling with clang 11 and without changing the compile flags I >> get lots >> (in the tens) of warnings like this: >> >> /home/jamatos/lyx/lyx/src/insets/InsetTabular.h:92:7: warning: >> definition of >> implicit copy constructor for 'InsetTableCell' is deprecated because >> it has a >> user-declared copy assignment operator [-Wdeprecated-copy] >> void operator=(InsetTableCell const &); > > Fixed ;) > > JMarc > > PS: yes, a proper fix will be eventually required, but I do not really > know what we should do.
I'm actually not sure why the assignment operator is made unavailable, but attached is a suitable patch, I think. Riki
>From 75572d0af787bbdacc430256c257de9e9ded0100 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck <rikih...@lyx.org> Date: Mon, 5 Oct 2020 13:11:48 -0400 Subject: [PATCH] Explicit InsetTableCell copy constructor --- src/insets/InsetTabular.cpp | 7 +++++++ src/insets/InsetTabular.h | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetTabular.cpp b/src/insets/InsetTabular.cpp index 8458ce4728..00a9c8c9a5 100644 --- a/src/insets/InsetTabular.cpp +++ b/src/insets/InsetTabular.cpp @@ -4207,6 +4207,13 @@ InsetTableCell::InsetTableCell(Buffer * buf) isMultiColumn(false), isMultiRow(false), contentAlign(LYX_ALIGN_CENTER) {} +InsetTableCell::InsetTableCell(InsetTableCell const & in) : InsetText(in) +{ + isFixedWidth = in.isFixedWidth; + isMultiColumn = in.isMultiColumn; + isMultiRow = in.isMultiRow; + contentAlign = in.contentAlign; +} bool InsetTableCell::forcePlainLayout(idx_type) const { diff --git a/src/insets/InsetTabular.h b/src/insets/InsetTabular.h index fd942049ba..2be6e8cb01 100644 --- a/src/insets/InsetTabular.h +++ b/src/insets/InsetTabular.h @@ -55,6 +55,8 @@ public: /// explicit InsetTableCell(Buffer * buf); /// + InsetTableCell(InsetTableCell const &); + /// InsetCode lyxCode() const { return CELL_CODE; } /// Inset * clone() const { return new InsetTableCell(*this); } @@ -113,7 +115,7 @@ private: // iterating, since this information is needed quite often, and so may // be quite slow. // So, well, if someone can do better, please do! - // --rgh + // --rkh /// bool isFixedWidth; /// -- 2.25.4
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel