Abdelrazak Younes wrote:

I need to check whether the textClass_ member of InsetCollapsable is needed now. I think not.

Now that the Buffer is accessible following Andre' recent change, I think not indeed.

This actually had to do with something else. It got added, I think, by
Bo to fix a crash that occurred during cut and paste, or something of
the sort. The problem was that InsetLayouts are stored in TextClass
objects, and there were times when the boost::shared_ptr would go out of
scope and the TextClass object would be released, and boom. Now that
we're holding these things in a global list, this shouldn't be an issue.
Some style comments below.

Thanks as always.

> +bool InsetCommandParams::writeEmptyOptional(ParamInfo::const_iterator ci) const
> +{
> +    if (!ci->isOptional())
> +        BOOST_ASSERT(false);
> +    ++ci; // we want to start with the next one

Hum, it's probably better to make a copy here of ci in order to avoid confusion.

A copy needs to be made here somewhere for sure. I was doing it when the
parameter is passed. But we could do:
+bool
InsetCommandParams::writeEmptyOptional(ParamInfo::const_iterator  & it)
const
+{
+    if (!it->isOptional())
+        BOOST_ASSERT(false);
+    ParamInfo::const_iterator ci = it;
+    ++ci;
instead. But that doesn't seem much clearer.

I'll commit this tonight.

Richard


Reply via email to