Hi Stephan, Hi List, sorry, I guess I misspoke: Those examples, which I listed, are rather obvious problems that aren't translation related. So let me rephrase: How to call a developer's attention to small pieces of code? And especially: may I combine that with translation patches?
I thought "OSL_ENSURE(false, …)" would be "problematic", because firstly there is an "OSL_FAIL" definition in "include/osl/diagnose.h", which seems to do exactly that. Secondly, the place I saw this (cui/source/tabpages/numpages.cxx line 2791 ff.) encapsulates that statement in an if clause. Together with the error message ("cannot happen"), it implies that could be reduced from… --- snip --- if (SVX_MAX_NUM <= nLvl) { OSL_ENSURE(false, "cannot happen."); return; } --- snap --- … to something like this: --- snip --- OSL_ENSURE_RETURN(!(SVX_MAX_NUM <= nLvl), "cannot happen."); --- snap --- (with OSL_ENSURE_RETURN being a OSL_ENSURE including a return statement.) If OSL_ENSURE is deprecated anyway, I guess this is irrelevant anyway. Yours, Sven On Friday 17 January 2014 12:08:15 Stephan Bergmann wrote: > [would probably have been better to start a new mail thread] > > On 01/17/2014 11:34 AM, Sven Wehner wrote: > > When I scroll through the source code, I sometimes see odd code. > > Things that a real developer should seriously take a look at. > > Something like one of the multiple "DELETEZ" defines, an "OSL_ENSURE(false, > > \"cannot happen.\")", German function names etc. > > Not sure what "a real developer should seriously take a look at" in an > > OSL_ENSURE(false, "cannot happen.") > > (other than OSL_ENSURE being deprecated). Those are generally > assertions that program logic cannot reach that point (like a default > case in a switch statement) unless there is a bug. > > Stephan > _______________________________________________ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice