Reduce the scope of some local variables

This commit is contained in:
Paul Cornett
2019-04-05 10:44:02 -07:00
parent af1cf0a5f3
commit fe1737d399
63 changed files with 163 additions and 152 deletions

View File

@@ -1195,7 +1195,6 @@ size_t wxMBConvUTF8::ToWChar(wchar_t *buf, size_t n,
while ((isNulTerminated ? *psz : srcLen--) && ((!buf) || (len < n)))
{
const char *opsz = psz;
bool invalid = false;
unsigned char cc = *psz++, fc = cc;
unsigned cnt;
for (cnt = 0; fc & 0x80; cnt++)
@@ -1219,6 +1218,7 @@ size_t wxMBConvUTF8::ToWChar(wchar_t *buf, size_t n,
}
else
{
bool invalid = false;
cnt--;
if (!cnt)
{