mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Added missing ()'s for allocations
This commit is contained in:
parent
2320e2eb8c
commit
40fe76d903
10 changed files with 21 additions and 21 deletions
|
@ -310,7 +310,7 @@ namespace Beefy.theme.dark
|
|||
delete mWindowTopImage;
|
||||
}
|
||||
|
||||
Image themeImg = Image.LoadFromFile(scope String..Append(tempStr, BFApp.sApp.mInstallDir, "images/DarkTheme.png"), .AllowRead);
|
||||
Image themeImg = Image.LoadFromFile(scope String()..Append(tempStr, BFApp.sApp.mInstallDir, "images/DarkTheme.png"), .AllowRead);
|
||||
defer delete themeImg;
|
||||
uint32[5] bits = ?;
|
||||
themeImg.GetBits(0, 0, bits.Count, 1, bits.Count, &bits);
|
||||
|
@ -335,7 +335,7 @@ namespace Beefy.theme.dark
|
|||
|
||||
mIconError = LoadSizedImage("IconError");
|
||||
mIconWarning = LoadSizedImage("IconWarning");
|
||||
mThemeImage = Image.LoadFromFile(scope String..Append(tempStr, BFApp.sApp.mInstallDir, "images/", uiFileName));
|
||||
mThemeImage = Image.LoadFromFile(scope String()..Append(tempStr, BFApp.sApp.mInstallDir, "images/", uiFileName));
|
||||
|
||||
for (int32 i = 0; i < (int32)ImageIdx.COUNT; i++)
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@ namespace System.IO
|
|||
char16* cStr = null;
|
||||
if (shellItem.VT.GetDisplayName(shellItem, .FILESYSPATH, out cStr) == .OK)
|
||||
{
|
||||
let str = scope String..Append(cStr);
|
||||
let str = scope String()..Append(cStr);
|
||||
mSelectedPath.Append(str);
|
||||
Windows.COM_IUnknown.CoTaskMemFree(cStr);
|
||||
result = .OK;
|
||||
|
|
|
@ -252,7 +252,7 @@ namespace System.Reflection
|
|||
{
|
||||
if (unboxToPtr)
|
||||
{
|
||||
int* stackDataPtr = scope:mixin int;
|
||||
int* stackDataPtr = scope:mixin int();
|
||||
*stackDataPtr = (int)dataPtr;
|
||||
ffiArgList.Add(stackDataPtr);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace BeefPerf
|
|||
public Socket mListenSocket ~ delete _;
|
||||
public Thread mSocketThread ~ delete _;
|
||||
public List<BpClient> mClients = new List<BpClient>() ~ delete _;
|
||||
public List<BpSession> mSessions = new List<BpSession> ~ DeleteContainerAndItems!(_);
|
||||
public List<BpSession> mSessions = new List<BpSession>() ~ DeleteContainerAndItems!(_);
|
||||
public Monitor mClientMonitor = new Monitor() ~ delete _;
|
||||
public WaitEvent mShutdownEvent = new WaitEvent() ~ delete _;
|
||||
public BpSession mCurSession;
|
||||
|
|
|
@ -19,33 +19,33 @@ namespace BeefPerf
|
|||
g.FillRect(0, 0, mWidth, mHeight);
|
||||
|
||||
g.SetFont(DarkTheme.sDarkTheme.mSmallFont);
|
||||
g.DrawString(scope String..AppendF("FPS: {0}", gApp.mLastFPS), 4, 0);
|
||||
g.DrawString(scope String()..AppendF("FPS: {0}", gApp.mLastFPS), 4, 0);
|
||||
|
||||
//
|
||||
g.DrawString(scope String..AppendF("{0}", gApp.mUpdateCnt), 0, 0, .Right, mWidth - 8);
|
||||
g.DrawString(scope String()..AppendF("{0}", gApp.mUpdateCnt), 0, 0, .Right, mWidth - 8);
|
||||
|
||||
float curY = 64;
|
||||
if (!gApp.mListenSocket.IsConnected)
|
||||
{
|
||||
using (g.PushColor(0xFFFF4040))
|
||||
g.DrawString(scope String..AppendF("Failed to listen on port {0}", gApp.mListenPort), 0, 0, .Right, mWidth - 8);
|
||||
g.DrawString(scope String()..AppendF("Failed to listen on port {0}", gApp.mListenPort), 0, 0, .Right, mWidth - 8);
|
||||
}
|
||||
else
|
||||
{
|
||||
g.DrawString(scope String..AppendF("Clients: {0}", gApp.mClients.Count), curY, 0);
|
||||
g.DrawString(scope String()..AppendF("Clients: {0}", gApp.mClients.Count), curY, 0);
|
||||
curY += 64;
|
||||
|
||||
float kPerSec = gApp.mStatBytesPerSec / 1024.0f;
|
||||
if ((kPerSec > 0) && (kPerSec < 0.1f))
|
||||
kPerSec = 0.1f;
|
||||
g.DrawString(scope String..AppendF("BPS: {0:0.0}k", kPerSec), curY, 0);
|
||||
g.DrawString(scope String()..AppendF("BPS: {0:0.0}k", kPerSec), curY, 0);
|
||||
curY += 80;
|
||||
}
|
||||
|
||||
if (gApp.mBoard.mPerfView != null)
|
||||
{
|
||||
var client = gApp.mBoard.mPerfView.mSession;
|
||||
g.DrawString(scope String..AppendF("Zones: {0}", (int32)client.mNumZones), curY, 0);
|
||||
g.DrawString(scope String()..AppendF("Zones: {0}", (int32)client.mNumZones), curY, 0);
|
||||
curY += 118;
|
||||
|
||||
var str = scope String();
|
||||
|
|
|
@ -110,7 +110,7 @@ namespace BeefPerf
|
|||
BpClient.TimeToStr(timeUS, timeStr, false);
|
||||
g.DrawString(timeStr, 4, 40, .Left, width - 8, .Ellipsis);
|
||||
|
||||
g.DrawString(scope String..AppendF("BPS: {0}k", session.mDispBPS), 4, 40, .Right, width - 8);
|
||||
g.DrawString(scope String()..AppendF("BPS: {0}k", session.mDispBPS), 4, 40, .Right, width - 8);
|
||||
}
|
||||
|
||||
curY += boxHeight + 4;
|
||||
|
|
|
@ -852,7 +852,7 @@ namespace IDE
|
|||
//folderDialog.
|
||||
if (folderDialog.ShowDialog(GetActiveWindow()).GetValueOrDefault() == .OK)
|
||||
{
|
||||
var selectedPath = scope String..AppendF(folderDialog.SelectedPath);
|
||||
var selectedPath = scope String()..AppendF(folderDialog.SelectedPath);
|
||||
selectedPath.Append(Path.DirectorySeparatorChar);
|
||||
selectedPath.Append("BeefSpace.toml");
|
||||
String.NewOrSet!(mDeferredOpenFileName, selectedPath);
|
||||
|
@ -2062,7 +2062,7 @@ namespace IDE
|
|||
if (relPath.EndsWith(endStr))
|
||||
relPath.RemoveToEnd(relPath.Length - endStr.Length);*/
|
||||
|
||||
var projectSpec = new Workspace.ProjectSpec;
|
||||
var projectSpec = new Workspace.ProjectSpec();
|
||||
projectSpec.mProjectName = new .(project.mProjectName);
|
||||
if (verSpec != null)
|
||||
{
|
||||
|
@ -2430,7 +2430,7 @@ namespace IDE
|
|||
}
|
||||
}
|
||||
|
||||
var projSpec = new Workspace.ProjectSpec;
|
||||
var projSpec = new Workspace.ProjectSpec();
|
||||
projSpec.mProjectName = new String(project.mProjectName);
|
||||
projSpec.mVerSpec = new VerSpecRecord();
|
||||
projSpec.mVerSpec.SetPath(".");
|
||||
|
@ -2488,7 +2488,7 @@ namespace IDE
|
|||
{
|
||||
for (var projectName in data.Enumerate("Projects"))
|
||||
{
|
||||
var projSpec = new Workspace.ProjectSpec;
|
||||
var projSpec = new Workspace.ProjectSpec();
|
||||
projSpec.mProjectName = new String(projectName);
|
||||
projSpec.mVerSpec = new VerSpecRecord();
|
||||
mWorkspace.mProjectSpecs.Add(projSpec);
|
||||
|
@ -9823,7 +9823,7 @@ namespace IDE
|
|||
{
|
||||
if (err != .NotFound)
|
||||
{
|
||||
Fail(scope String..AppendF("Failed to rename {0} to {1}", dbgBuildDir, tempDirName));
|
||||
Fail(scope String()..AppendF("Failed to rename {0} to {1}", dbgBuildDir, tempDirName));
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1401,7 +1401,7 @@ namespace IDE
|
|||
public void OpenWorkspace(String dirPath)
|
||||
{
|
||||
gApp.[Friend]mDeferredOpen = .Workspace;
|
||||
var selectedPath = scope String..AppendF(dirPath);
|
||||
var selectedPath = scope String()..AppendF(dirPath);
|
||||
selectedPath.Append(Path.DirectorySeparatorChar);
|
||||
selectedPath.Append("BeefSpace.toml");
|
||||
IDEUtils.FixFilePath(selectedPath);
|
||||
|
|
|
@ -411,7 +411,7 @@ namespace IDE.ui
|
|||
switch ((CategoryType)mPropPage.mCategoryType)
|
||||
{
|
||||
case .Project:
|
||||
var generalOptions = scope Project.GeneralOptions;
|
||||
var generalOptions = scope Project.GeneralOptions();
|
||||
mProject.SetupDefault(generalOptions);
|
||||
targetDict[mCurPropertiesTargets[0]] = generalOptions;
|
||||
UpdateFromTarget(targetDict);
|
||||
|
@ -420,7 +420,7 @@ namespace IDE.ui
|
|||
DistinctBuildOptions defaultTypeOptions = scope:: .();
|
||||
for (var typeOption in mProject.mBeefGlobalOptions.mDistinctBuildOptions)
|
||||
targetDict[typeOption] = defaultTypeOptions;
|
||||
var generalOptions = scope Project.BeefGlobalOptions;
|
||||
var generalOptions = scope Project.BeefGlobalOptions();
|
||||
mProject.SetupDefault(generalOptions);
|
||||
targetDict[mCurPropertiesTargets[0]] = generalOptions;
|
||||
UpdateFromTarget(targetDict);
|
||||
|
|
|
@ -672,7 +672,7 @@ namespace IDE.ui
|
|||
DistinctBuildOptions defaultTypeOptions = scope:: .();
|
||||
for (var typeOption in gApp.mWorkspace.mBeefGlobalOptions.mDistinctBuildOptions)
|
||||
targetDict[typeOption] = defaultTypeOptions;
|
||||
var generalOptions = scope Workspace.BeefGlobalOptions;
|
||||
var generalOptions = scope Workspace.BeefGlobalOptions();
|
||||
targetDict[mCurPropertiesTargets[0]] = generalOptions;
|
||||
UpdateFromTarget(targetDict);
|
||||
case .Beef_Targeted:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue