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

Commit de86d30

Browse files
authored
libfoundation: Don't use ternary op in initialisation
1 parent 1749e16 commit de86d30

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libfoundation/src/foundation-string.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1513,7 +1513,11 @@ bool MCStringCopyReversed(MCStringRef self, MCStringRef& r_new_string)
15131513
* unichar_t codeunits items per grapheme. In this case, we
15141514
* reverse by iterating over the contents of the original
15151515
* string, copying the graphemes into the new string. */
1516-
MCStringRef t_original = __MCStringIsIndirect(self) ? self->string : self;
1516+
MCStringRef t_original = self;
1517+
if (__MCStringIsIndirect(t_original))
1518+
{
1519+
t_original = t_original->string;
1520+
}
15171521

15181522
/* Start of the next grapheme to copy, in the input string */
15191523
uindex_t t_from = 0;

0 commit comments

Comments
 (0)