MCPcopy Create free account
hub / github.com/beefytech/Beef / AddEntry

Method AddEntry

IDEHelper/Compiler/BfAutoComplete.cpp:35–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33}
34
35AutoCompleteEntry* AutoCompleteBase::AddEntry(const AutoCompleteEntry& entry, const StringImpl& filter)
36{
37 uint8 matches[256];
38
39 if (!DoesFilterMatch(entry.mDisplay, filter.c_str(), entry.mScore, matches, 256) || (entry.mNamePrefixCount < 0))
40 return NULL;
41
42 entry.mMatchesLength = mDoFuzzyAutoComplete ? u8_strlen((char*)filter.c_str()) : 0;
43 entry.mMatches = (entry.mMatchesLength > 0) ? matches : nullptr;
44
45 auto result = AddEntry(entry);
46
47 // Reset matches because the array will be invalid after return
48 entry.mMatches = nullptr;
49 entry.mMatchesLength = 0;
50
51 return result;
52}
53
54AutoCompleteEntry* AutoCompleteBase::AddEntry(const AutoCompleteEntry& entry, const char* filter)
55{

Callers 15

DoLookupIdentifierMethod · 0.80
AutocompleteAddMethodMethod · 0.80
TryCaseTupleMatchMethod · 0.80
TryCaseEnumMatchMethod · 0.80
VisitMethod · 0.80
WarnMethod · 0.80
EmitCtorBodyMethod · 0.80
DoMethodDeclarationMethod · 0.80

Calls 4

c_strMethod · 0.45
ReserveMethod · 0.45
TryAddMethod · 0.45
AllocBytesMethod · 0.45

Tested by

no test coverage detected