Code review comment for lp:~cern-kicad/kicad/bugfix_1275319

Revision history for this message
Dick Hollenbeck (dickelbeck) wrote :

>
> Sincerely, my main concern is to fix the bug. I have already learned a
> lesson and reverted the commit that you have found improper. Is there
> anything else that I could do to have the branch merged?

Yep, move this out of the header file, into a *.cpp file please.
I think it is being instantiated in ALL compilation units in which it is visible, when
doing a DEBUG build. You only need it in ONE compilation unit for it to do its duty.

+#ifndef NDEBUG
+struct static_check {
+ static_check()
+ {
+ // Long (the type used for saving visibility settings) is only 32 bits guaranteed,
+ // be sure that we do not cross the limit
+ assert( END_PCB_VISIBLE_LIST <= 32 );
+ };
+};
+static static_check check;
+#endif

After than change, I approve the patch and somebody else can feel free to commit it as far
as I am concerned.

Sorry, I am too busy.

Dick

« Back to merge proposal