> > pt_PT_ChangeSpan.cpp: added a helpful debug message before an
> > unhelpful assert.
> 
> If an assert is unhelpful, it's a bad assert. If it's in a so complicated
> context that you can't easily understand the reason for it, add comments. An
> assert that no one understands is even *less* helpful than a SEGV. All IMHO
> of course.

I shoudn't have been so laconic; the assert in itself is good, but it 
sits in a default case of a switch, and when it happens there is no 
indication of what the offending switch value was (and becasue the 
switch is done on a function call, not a variable, it is not obvious 
even in a debugger). I have simply added a debug msg printing the 
offending value before the assert.

Tomas

Reply via email to