Le 19/10/2016 à 14:29, Enrico Forestieri a écrit :
../../master/src/Paragraph.cpp: In member function ‘void
lyx::Paragraph::latex(const lyx::BufferParams&, const lyx::Font&,
lyx::otexstream&, const lyx::OutputParams&, int, int, bool) const’:
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullNone’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullSimple’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullXXAlignAt’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullRegexp’ not handled in switch [-Wswitch]
../../master/src/Paragraph.cpp:2409:13: attention : enumeration value
‘hullUnknown’ not handled in switch [-Wswitch]

I thought about that and deliberately omitted the cases for which
nothing has to be done, because with default compiler switches I get
no warnings. Adding them would simply make the source less readable,
IMO. A "default:" case would silence the compiler, but does this
also silence fundamentalists? ;-)

I do get warnings with default compiler switches (which include -Wall here).

I guess it is a fight between source fundamentalists and warning fundamentalists, then.

The issue is not only about fundamentalism, it is also about what happens when one introduces a new hullType. How do you find out what should be changed and where?

I agree though that the list is becoming lengthy. If it happens that we are often special-casing a special group oh hull types, then it is probably a good idea to create a new athod to give a name to this particular group of hulls.

For example, for what reason is the list here different from the list in InsetMathHull::display()?

JMarc

Reply via email to