Le 13/02/2025 à 14:33, Pavel Sanda a écrit :
In most of committed changes I agree, if the temporary variable is called
"temp" there is no advantage in having it. But the cases for "name" and
"state" or "command" variable in the next commit improve immediate
readability of the code, at least for me.

In this case (dispatch function) the best woudl be a comment (taken from LyXAction.cpp):
// Syntax: toolbar-set <NAME> [on|off|auto]

I am not sure whether we are ready to do this for all dispatch/getStatus entries though. And I doubt it is easy enough to write a script doing that.

Do other devvies care one way or the other? I will revert unless someone thinks otherwise.

My algorithm with these coverity issues is to take them one by one and try quickly to find an alternative that would be better and avoid the warning. I agree that in general we do not care about the performance gain. But we had 200 new warnings at some time, so it is time to handle them one by one. I do the obvious ones first, the tricky ones will be next.

JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
https://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to