On 12/5/20 11:31 AM, Yuriy Skalko wrote: >> I see they are in now, but I have a proposal (of style). I code like >> below, >> - for (; qq != end; ++qq) { >> - docstring const style = from_ascii(qq->first); >> - bool langdef = (style[0] == langqs); >> - bool globaldef = (style[0] == globalqsc); >> + map<string, docstring> styles = quoteparams.getTypes(); >> + for (auto const & s : styles) { >> + char style_char = (s.first)[0]; >> + bool langdef = (style_char == langqs); >> + bool globaldef = (style_char == globalqsc); >> + docstring const style = from_ascii(s.first); >> isn't it better to do directly as follows? >> + for (auto const & s : quoteparams.getTypes()) { >> >> Regards, >> JMarc > > I just wanted to leave types of the pair as visible. Probably this is > not really important and the code should be shortened to your variant.
I tend to agree with Yuriy here. The code is a bit longer, but you do get an explicit indication of what the type is, which can be helpful when trying to read the code: You don't have to go look at InsetQuotes::getTypes to find out. Riki -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel