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

Commit fe1c6aa

Browse files
committed
libfoundation: Remove dead code.
Remove unused variables and a (very dead) unused function.
1 parent 21338d6 commit fe1c6aa

1 file changed

Lines changed: 1 addition & 23 deletions

File tree

libfoundation/src/foundation-string.cpp

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -831,25 +831,6 @@ bool MCStringCreateUnicodeStringFromData(MCDataRef p_data, bool p_is_external_re
831831

832832
////////////////////////////////////////////////////////////////////////////////
833833

834-
static bool __MCStringFormatSupportedForUnicode(const char *p_format)
835-
{
836-
while(*p_format != '\0')
837-
{
838-
if (*p_format == '%' &&
839-
(p_format[1] != 's' && p_format[1] != 'd' && p_format[1] != '@'))
840-
return false;
841-
842-
if (*p_format == '\\' &&
843-
(p_format[1] != 'n' && p_format[1] != '"'))
844-
return false;
845-
846-
p_format++;
847-
}
848-
849-
return true;
850-
}
851-
852-
853834
MC_DLLEXPORT_DEF
854835
bool MCStringFormatV(MCStringRef& r_string, const char *p_format, va_list p_args)
855836
{
@@ -5297,7 +5278,7 @@ bool MCStringSplitByDelimiter(MCStringRef self, MCStringRef p_elem_del, MCString
52975278
if (__MCStringIsIndirect(p_elem_del))
52985279
p_elem_del = p_elem_del -> string;
52995280

5300-
const void *t_echar, *t_kchar;
5281+
const void *t_echar;
53015282
bool del_native;
53025283
del_native = MCStringIsNative(p_elem_del);
53035284
t_echar = p_elem_del -> chars;
@@ -5837,7 +5818,6 @@ static bool __MCStringNativize(MCStringRef self, uindex_t & r_char_count)
58375818
}
58385819

58395820
uindex_t t_current = 0, t_next;
5840-
bool t_is_native = true;
58415821
for (uindex_t i = 0; i < t_char_range . length; i++)
58425822
{
58435823
// If we've reached the end, set the next boundary manually
@@ -5867,7 +5847,6 @@ static bool __MCStringNativize(MCStringRef self, uindex_t & r_char_count)
58675847
}
58685848
else
58695849
{
5870-
t_is_native = false;
58715850
chars[i] = '?';
58725851
}
58735852
}
@@ -6724,7 +6703,6 @@ static bool __MCStringResolveIndirect(__MCString *self)
67246703
}
67256704
else
67266705
{
6727-
unichar_t *t_uni_chars;
67286706
if (!__MCStringCloneBuffer(t_string, t_chars, t_char_count))
67296707
return false;
67306708

0 commit comments

Comments
 (0)