<p></p>
<p>I missed the zoom/ascent/descent but still its only 4 ints.</p>
<p>Why do you need prev + old ones? There are 5 values including font, you are comparing the current values to the set that your cached height meets to avoid re-calculating height.  There is only one compare for each hash calculation, so hashing gives no real benefit that I see since you do the hash calculation of the current values each time, hashes are good if you need lots of compares each time.</p>
<p>To me:</p>
<pre><code>font = sci_get_string(sci, SCI_STYLEGETFONT, 0);
size = SSM(sci, SCI_STYLEGETSIZEFRACTIONAL, 0, 0);
zoom = SSM(sci, SCI_GETZOOM, 0, 0);
descent = SSM(sci, SCI_GETEXTRADESCENT, 0, 0);
ascent = SSM(sci, SCI_GETEXTRAASCENT, 0, 0);
if(cached_size == size && cached_zoom == zoom && cached_descent = descent && cached_zoom == zoom && cached_ascent == ascent && strcmp(cached_font, font) == 0) ......
</code></pre>
<p>is clearer and guaranteed to be correct.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786953">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ3W6ISRPJGFHMJ43NLS5PQMBANCNFSM4XDYPPXA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ63YVMKCG4PL6RRW3TS5PQMBA5CNFSM4XDYPPXKYY3PNVWWK3TUL52HS4DFVVBW63LNNF2EG33NNVSW45FKMNXW23LFNZ2F62LEZYBMT2MJ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786953",
"url": "https://github.com/geany/geany/commit/b08ae0fe65c0942dca20281d6841dc83406d8b5e#commitcomment-46786953",
"name": "View Commit"
},
"description": "View this Commit on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>