On Mon, Oct 12, 2015 at 4:17 AM, Scott Kostyshak <skost...@lyx.org> wrote:
> On Sun, Oct 11, 2015 at 11:20:15AM +0200, Georg Baum wrote:
>> commit cea2d71e641e6a4023128a367d1cd5a593ed1706
>> Author: Georg Baum <b...@lyx.org>
>> Date:   Sun Oct 11 11:16:09 2015 +0200
>>
>>     Comply with rule-of-three
>>
>>     The rule-of-three says that if any of virtual destructor, copy 
>> constructor
>>     or assignment operator needs to be manually implemented, then all three
>>     should be implemented. Otherwise you can get subtle bugs which can be
>>     difficult to find. In the changed classes, changing a copy-construction 
>> to
>>     an assignment would have had surprising effects. Now they all behave
>>     consistently.
>
> Is there any automatic check of the rule-of-three (e.g. by cppcheck or
> Coverity)?
>
I'm not sure, but I don't think so. I did a Coverity check today, and
there were 14 fixes since last check (about a month ago), most
probably duplicates with cppcheck and fixed courtesy of Georg. I'm
still trying to find my way around Coverity interface, but I think
this is the list:
https://scan4.coverity.com/reports.htm#v12247/p10234/fileInstanceId=4736058&defectInstanceId=1279561&mergedDefectId=111941


I've looked at this particular commit, however, and none of the files
affected here are within the Coverity issues that were fixed. Feel
free to look at them yourself in case I missed something.

Looking at outstanding issues I can see however an unitialized scalar
in src/insets/InsetIPA.cpp (see CID 23447) and
src/insets/InsetPreview.cpp (CID 23426). Both are right above the
changes by Georg.

Liviu




> Scott



-- 
Do you think you know what math is?
http://www.ideasroadshow.com/issues/ian-stewart-2013-08-02
Or what it means to be intelligent?
http://www.ideasroadshow.com/issues/john-duncan-2013-08-30
Think again:
http://www.ideasroadshow.com/library

Reply via email to