follow-up bit

minor, but inner loop assignments to glyph and mapsym
are only needed when corr_next2u is TRUE
This commit is contained in:
nhmall
2024-04-04 16:51:51 -04:00
parent 2b0459e2b8
commit 080c6747fd

View File

@@ -1316,14 +1316,17 @@ dolookaround(void)
iflags.getloc_filter = GFILTER_VIEW;
for (y = 0; y < ROWNO; y++)
for (x = 1; x < COLNO; x++) {
int glyph = glyph_at(x, y),
mapsym = glyph_is_cmap(glyph) ? glyph_to_cmap(glyph) : -1;
int glyph, mapsym;
boolean iscorr = (corr_next2u
&& (glyph = glyph_at(x, y)) >= 0
&& glyph_is_cmap(glyph)
&& ((mapsym = glyph_to_cmap(glyph)) == S_corr
|| mapsym == S_litcorr));
if (!u_at(x, y)
&& (gather_locs_interesting(x, y, GLOC_INTERESTING)
/* note: GLOC_INTERESTING catches S_engrcorr */
|| (corr_next2u && (mapsym == S_corr
|| mapsym == S_litcorr)))) {
|| iscorr)) {
char buf[BUFSZ];
coord cc;
int sym = 0;