Skip to content

Commit 5393fca

Browse files
qaisjpccw808
authored andcommitted
Clean up 1735e60 a little
1 parent 697bb32 commit 5393fca

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

Shared/mods/deathmatch/logic/CLuaShared.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,21 +53,16 @@ bool CLuaShared::CheckUTF8BOMAndUpdate ( const char ** pcpOutBuffer, uint * puiO
5353
{
5454
const char*& cpBuffer = *pcpOutBuffer;
5555
uint& uiSize = *puiOutSize;
56-
bool bUTF8;
5756

5857
// UTF-8 BOM? Compare by checking the standard UTF-8 BOM
5958
if ( IsUTF8BOM ( cpBuffer, uiSize ) )
6059
{
6160
// If there's a BOM, load ignoring the first 3 bytes
62-
bUTF8 = true;
6361
cpBuffer += 3;
6462
uiSize -= 3;
65-
}
66-
else
67-
{
68-
// Maybe not UTF-8, if we have a >80% heuristic detection confidence, assume it is
69-
bUTF8 = ( GetUTF8Confidence ( (const unsigned char*) cpBuffer, uiSize ) >= 80 );
63+
return true;
7064
}
7165

72-
return bUTF8;
66+
// Maybe not UTF-8, if we have a >80% heuristic detection confidence, assume it is
67+
return GetUTF8Confidence ( (const unsigned char*) cpBuffer, uiSize ) >= 80;
7368
}

0 commit comments

Comments
 (0)