On Fri, 18 Nov 2022 at 18:41, Scott Kostyshak <skost...@lyx.org> wrote:
> What do you think of the attached patch? It adds braces to restrict the > scope of the variable 'potential_terms'. I like this style, since it > makes it easier for me to read, but I wonder if others would find it > annoying. For example, it adds an extra layer of indentation. > You can avoid this level of indentation by defining the variable within the if: if (const vector<docstring> potential_terms = getSubentriesAsText(runparams); !potential_terms.empty()) { I don't really like this syntax, because it makes extremely long lines, but it has strong advantages.
-- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel