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

Commit b46fc55

Browse files
committed
[[ Cleanup ]] Rename MCNameLookup to MCNameLookupCaseless
This patch renames the MCNameLookup function to MCNameLookupCaseless to make it clearer what the function is doing.
1 parent 6b86e1d commit b46fc55

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

engine/src/exec-interface-group.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ void MCGroup::SetHilitedButtonName(MCExecContext& ctxt, uint32_t part, MCStringR
259259
// Clicking on the button attemps to hilite the option "title,menu,maximize,minimise,close"
260260
// but only "title,menu,minimize,maximise,close" exists, returning a nil NameRef
261261
MCNameRef t_nameref;
262-
t_nameref = MCNameLookup(p_name);
262+
t_nameref = MCNameLookupCaseless(p_name);
263263
if (t_nameref != nil)
264264
bptr->resethilite(part, bptr->hasname(t_nameref));
265265
else

engine/src/exec-interface-stack.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1170,7 +1170,7 @@ void MCStack::SetSubstacks(MCExecContext& ctxt, MCStringRef p_substacks)
11701170
{
11711171
// Lookup 't_name_string' as a name, if it doesn't exist it can't exist as a substack
11721172
// name.
1173-
&t_name = MCValueRetain(MCNameLookup(*t_name_string));
1173+
&t_name = MCValueRetain(MCNameLookupCaseless(*t_name_string));
11741174
if (*t_name != nil)
11751175
{
11761176
while (tsub -> hasname(*t_name))

engine/src/exec-multimedia.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ static MCPlayer* MCMultimediaExecGetClip(MCExecContext& ctxt, MCStringRef p_clip
575575
if (p_chunk_type == CT_EXPRESSION)
576576
{
577577
// AL-2014-05-27: [[ Bug 12517 ]] MCNameLookup does not increase the ref count
578-
return MCPlayer::FindPlayerByName(MCNameLookup(p_clip));
578+
return MCPlayer::FindPlayerByName(MCNameLookupCaseless(p_clip));
579579
}
580580

581581
if (p_chunk_type == CT_ID)

engine/src/foundation-legacy.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,7 +1150,7 @@ MCNameRef MCNameLookupWithCString(const char *cstring, MCCompareOptions options)
11501150
return nil;
11511151

11521152
MCNameRef t_name;
1153-
t_name = MCNameLookup(t_string);
1153+
t_name = MCNameLookupCaseless(t_string);
11541154
MCValueRelease(t_string);
11551155

11561156
return t_name;
@@ -1163,7 +1163,7 @@ MCNameRef MCNameLookupWithOldString(const MCString& string, MCCompareOptions opt
11631163
return nil;
11641164

11651165
MCNameRef t_name;
1166-
t_name = MCNameLookup(t_string);
1166+
t_name = MCNameLookupCaseless(t_string);
11671167
MCValueRelease(t_string);
11681168

11691169
return t_name;

engine/src/stack3.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ Exec_stat MCStack::resubstack(MCStringRef p_data)
799799
// If t_val doesn't exist as a name, it can't exist as a substack name.
800800
// t_val is always a stringref (fetched from an MCSplitString array)
801801
MCNameRef t_name;
802-
t_name = MCNameLookup((MCStringRef)t_val);
802+
t_name = MCNameLookupCaseless((MCStringRef)t_val);
803803

804804
if (t_name != nil)
805805
while (tsub -> hasname(t_name))

libfoundation/include/foundation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2050,7 +2050,7 @@ MC_DLLEXPORT bool MCNameCreateWithNativeChars(const char_t *chars, uindex_t coun
20502050
MC_DLLEXPORT bool MCNameCreateAndRelease(MCStringRef string, MCNameRef& r_name);
20512051

20522052
// Looks for an existing name matching the given string.
2053-
MC_DLLEXPORT MCNameRef MCNameLookup(MCStringRef string);
2053+
MC_DLLEXPORT MCNameRef MCNameLookupCaseless(MCStringRef string);
20542054

20552055
// Returns a unsigned integer which can be used to order a table for a binary
20562056
// search.

libfoundation/src/foundation-name.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ bool MCNameCreateAndRelease(MCStringRef p_string, MCNameRef& r_name)
206206
}
207207

208208
MC_DLLEXPORT_DEF
209-
MCNameRef MCNameLookup(MCStringRef p_string)
209+
MCNameRef MCNameLookupCaseless(MCStringRef p_string)
210210
{
211211
// Compute the hash of the characters, up to case.
212212
hash_t t_hash;

0 commit comments

Comments
 (0)