mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Deprecated DeleteAndClearItems
This commit is contained in:
parent
bd57172996
commit
1be37e6f24
8 changed files with 17 additions and 7 deletions
|
@ -152,6 +152,8 @@ static
|
|||
}
|
||||
}
|
||||
|
||||
[NoShow]
|
||||
[Warn("This mixin has been replaced by ClearAndDeleteItems")]
|
||||
public static mixin DeleteAndClearItems(var container)
|
||||
{
|
||||
for (var value in container)
|
||||
|
@ -159,6 +161,13 @@ static
|
|||
container.Clear();
|
||||
}
|
||||
|
||||
public static mixin ClearAndDeleteItems(var container)
|
||||
{
|
||||
for (var value in container)
|
||||
delete value;
|
||||
container.Clear();
|
||||
}
|
||||
|
||||
public static void ClearAndDeleteItems<T>(List<T> container) where T : var
|
||||
{
|
||||
for (var value in container)
|
||||
|
|
|
@ -1195,7 +1195,7 @@ namespace IDE
|
|||
}
|
||||
|
||||
var aDialog = QuerySaveFiles(changedList);
|
||||
DeleteAndClearItems!(changedList);
|
||||
ClearAndDeleteItems(changedList);
|
||||
|
||||
aDialog.mDefaultButton = aDialog.AddButton("Save", new (evt) =>
|
||||
{
|
||||
|
@ -2977,7 +2977,7 @@ namespace IDE
|
|||
using (data.Open("MainDockingFrame"))
|
||||
DeserializeDockingFrame(data, mDockingFrame);
|
||||
|
||||
DeleteAndClearItems!(mRecentlyDisplayedFiles);
|
||||
ClearAndDeleteItems(mRecentlyDisplayedFiles);
|
||||
for (data.Enumerate("RecentFilesList"))
|
||||
{
|
||||
String relPath = scope String();
|
||||
|
|
|
@ -1938,7 +1938,7 @@ namespace IDE
|
|||
ReadStrings("EnvironmentVars", options.mDebugOptions.mEnvironmentVars);
|
||||
|
||||
// BeefOptions
|
||||
DeleteAndClearItems!(options.mBeefOptions.mPreprocessorMacros);
|
||||
ClearAndDeleteItems(options.mBeefOptions.mPreprocessorMacros);
|
||||
if (data.Contains("PreprocessorMacros"))
|
||||
{
|
||||
for (var _preproc in data.Enumerate("PreprocessorMacros"))
|
||||
|
|
|
@ -220,7 +220,7 @@ namespace IDE
|
|||
|
||||
public void Clear()
|
||||
{
|
||||
DeleteAndClearItems!(mCmdList);
|
||||
ClearAndDeleteItems(mCmdList);
|
||||
mFailed = false;
|
||||
mCurCmd = null;
|
||||
}
|
||||
|
|
|
@ -924,7 +924,7 @@ namespace IDE
|
|||
{
|
||||
HashSet<String> usedCommands = scope .();
|
||||
List<String> allocatedStrs = scope .();
|
||||
defer { DeleteAndClearItems!(allocatedStrs); }
|
||||
defer { ClearAndDeleteItems(allocatedStrs); }
|
||||
|
||||
List<Entry> newEntries = new .();
|
||||
for (let cmdStr in sd.Enumerate())
|
||||
|
|
|
@ -87,7 +87,7 @@ namespace IDE.ui
|
|||
|
||||
void GetEntries()
|
||||
{
|
||||
DeleteAndClearItems!(mEntries);
|
||||
ClearAndDeleteItems(mEntries);
|
||||
ResolveParams resolveParams = scope ResolveParams();
|
||||
mSourceViewPanel.Classify(ResolveType.GetNavigationData, resolveParams);
|
||||
if (resolveParams.mNavigationData != null)
|
||||
|
|
|
@ -6390,7 +6390,7 @@ namespace IDE.ui
|
|||
}
|
||||
else
|
||||
{
|
||||
DeleteAndClearItems!(mErrorList);
|
||||
ClearAndDeleteItems(mErrorList);
|
||||
}
|
||||
|
||||
int32 errorCount = processingPassInstance.GetErrorCount();
|
||||
|
|
|
@ -14417,6 +14417,7 @@ void BfExprEvaluator::InjectMixin(BfAstNode* targetSrc, BfTypedValue target, boo
|
|||
return;
|
||||
}
|
||||
auto methodInstance = moduleMethodInstance.mMethodInstance;
|
||||
PerformCallChecks(methodInstance, targetSrc);
|
||||
|
||||
for (int checkGenericIdx = 0; checkGenericIdx < (int)methodMatcher.mBestMethodGenericArguments.size(); checkGenericIdx++)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue