Skip to content

Commit 58996c3

Browse files
committed
[[ Cleanup ]] Remove MCNameCreateWithOldString
This patch removes the MCNameCreateWithOldString function.
1 parent c5c895b commit 58996c3

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

engine/src/card.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1861,8 +1861,6 @@ void MCCard::geometrychanged(const MCRectangle &p_rect)
18611861

18621862
MCCard *MCCard::findname(Chunk_term type, MCNameRef inname)
18631863
{
1864-
// MCNewAutoNameRef t_name;
1865-
// /* UNCHECKED */ MCNameCreateWithOldString(inname, &t_name);
18661864
if (type == CT_CARD && MCU_matchname(inname, CT_CARD, getname()))
18671865
return this;
18681866
else

engine/src/externalv0.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ static int trans_stat(Exec_stat stat)
435435
static Exec_stat getvarptr(MCExecContext& ctxt, const MCString &vname, MCContainer& r_container)
436436
{
437437
MCNewAutoNameRef t_name;
438-
if (!MCNameCreateWithOldString(vname, &t_name))
438+
if (!MCNameCreateWithNativeChars((const char_t *)vname.getstring(), vname.getlength(), &t_name))
439439
{
440440
return ES_ERROR;
441441
}

engine/src/foundation-legacy.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,11 +1062,6 @@ bool MCNameCreateWithCString(const char *p_cstring, MCNameRef& r_name)
10621062
return MCNameCreateWithNativeChars((const char_t *)p_cstring, strlen(p_cstring), r_name);
10631063
}
10641064

1065-
bool MCNameCreateWithOldString(const MCString& p_old_string, MCNameRef& r_name)
1066-
{
1067-
return MCNameCreateWithNativeChars((const char_t *)p_old_string . getstring(), p_old_string . getlength(), r_name);
1068-
}
1069-
10701065
bool MCNameGetAsIndex(MCNameRef p_name, index_t& r_index)
10711066
{
10721067
MCStringRef t_key;
@@ -1324,7 +1319,7 @@ IO_stat MCArrayLoadFromHandleLegacy(MCArrayRef self, IO_handle p_stream)
13241319
// so we pass p_translate = true.
13251320
t_stat = IO_read_string_legacy_full(t_key, t_length, p_stream, 1, true, true);
13261321
if (t_stat == IO_NORMAL)
1327-
if (!MCNameCreateWithOldString(MCString(t_key, t_length), &t_name))
1322+
if (!MCNameCreateWithNativeChars((const char_t*)t_key, t_length, &t_name))
13281323
t_stat = IO_ERROR;
13291324

13301325
MCMemoryDeallocate(t_key);

engine/src/foundation-legacy.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ MCString MCDataGetOldString(MCDataRef data);
7777
////////////////////////////////////////////////////////////////////////////////
7878

7979
bool MCNameCreateWithCString(const char *cstring, MCNameRef& r_name);
80-
bool MCNameCreateWithOldString(const MCString& oldstring, MCNameRef& r_name);
8180

8281
bool MCNameGetAsIndex(MCNameRef name, index_t& r_index);
8382

0 commit comments

Comments
 (0)