Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 4e3f5ba

Browse files
committed
[[ CID 127999 ]] Remove unneccessary code
As t_is_unicode is always true, it can be removed and the conditional assignment to t_index_size can be simplified.
1 parent 203c187 commit 4e3f5ba

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

engine/src/block.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,11 @@ bool MCBlock::visit(MCObjectVisitorOptions p_options, uint32_t p_part, MCObjectV
149149
// values to store (stack file format v8.1).
150150
uint32_t MCBlock::getminimumstackfileversion(void)
151151
{
152-
bool t_is_unicode;
153152
// paragraph text is always unicode when saving as version 7.0 or greater.
154153
// since we can't know which version will be used at this point, the
155154
// best we can do is assume unicode text.
156-
/* t_is_unicode = !MCStringIsNative(parent->GetInternalStringRef()); */
157-
t_is_unicode = true;
158-
159155
uint32_t t_index_size;
160-
t_index_size = t_is_unicode ? sizeof(unichar_t) : sizeof(char_t);
156+
t_index_size = sizeof(unichar_t);
161157

162158
if (m_index * t_index_size > UINT16_MAX || m_size * t_index_size > UINT16_MAX)
163159
return kMCStackFileFormatVersion_8_1;

0 commit comments

Comments
 (0)