Skip to content

Commit 5247036

Browse files
committed
Fix a lot of warnings and build output spam
It made it difficult to find the actual issues. Should try to fix all warnings when reasonable so bugs/mistakes aren't overlooked.
1 parent bfd1667 commit 5247036

File tree

4 files changed

+18
-11
lines changed

4 files changed

+18
-11
lines changed

BeefSpace.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ Unlocked = ["Zlib"]
66
StartupProject = "Nanoforge"
77

88
[Configs.Debug.Win64]
9-
Toolset = "LLVM"
109
BfSIMDSetting = "SSE4"
1110

1211
[Configs.Release.Win64]
12+
Toolset = "Microsoft"
1313
BfSIMDSetting = "SSE4"
1414

15+
[Configs.Release.Win32]
16+
Toolset = "Microsoft"
17+
1518
[Configs.Paranoid.Win64]
1619
BfSIMDSetting = "SSE4"
1720

Dependencies/Beef.Linq

src/App/Project/Snapshot.bf

+12-8
Original file line numberDiff line numberDiff line change
@@ -115,18 +115,22 @@ namespace Nanoforge.App.Project
115115
{
116116
Type selfType = typeof(Self);
117117
var genericTypeName = typeof(T).GetFullName(.. scope .());
118+
118119
Compiler.EmitTypeBody(selfType, scope $"\npublic virtual void Apply(EditorObject target)");
119120
Compiler.EmitTypeBody(selfType, "\n{\n");
120-
Compiler.EmitTypeBody(selfType, scope $" {genericTypeName} targetTyped = ({genericTypeName})target;\n");
121-
for (var field in typeof(T).GetFields())
121+
if (typeof(T).FieldCount > 0)
122122
{
123-
//Only track fields with [EditorProperty] attribute
124-
var result = field.GetCustomAttribute<EditorPropertyAttribute>();
125-
if (result == .Err)
126-
continue;
123+
Compiler.EmitTypeBody(selfType, scope $" {genericTypeName} targetTyped = ({genericTypeName})target;\n");
124+
for (var field in typeof(T).GetFields())
125+
{
126+
//Only track fields with [EditorProperty] attribute
127+
var result = field.GetCustomAttribute<EditorPropertyAttribute>();
128+
if (result == .Err)
129+
continue;
127130

128-
StringView fieldName = field.Name;
129-
Compiler.EmitTypeBody(selfType, scope $" targetTyped.[Friend]{fieldName} = this.{fieldName};\n");
131+
StringView fieldName = field.Name;
132+
Compiler.EmitTypeBody(selfType, scope $" targetTyped.[Friend]{fieldName} = this.{fieldName};\n");
133+
}
130134
}
131135
Compiler.EmitTypeBody(selfType, "}");
132136
}

src/Gui/Panels/MainMenuBar.bf

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace Nanoforge.Gui.Panels
180180
{
181181
ImGui.ID dockLeftId = ImGui.DockBuilderSplitNode(DockspaceId, .Left, 0.20f, var outIdLeft, out DockspaceId);
182182
ImGui.ID dockRightId = ImGui.DockBuilderSplitNode(DockspaceId, .Right, 0.28f, var outIdRight, out DockspaceId);
183-
ImGui.ID dockRightUp = ImGui.DockBuilderSplitNode(dockRightId, .Up, 0.35f, var outIdRightUp, out dockRightId);
183+
//ImGui.ID dockRightUp = ImGui.DockBuilderSplitNode(dockRightId, .Up, 0.35f, var outIdRightUp, out dockRightId);
184184
DockspaceCentralNodeId = ImGui.DockBuilderGetCentralNode(DockspaceId).ID;
185185
ImGui.ID dockCentralDownSplitId = ImGui.DockBuilderSplitNode(DockspaceCentralNodeId, .Down, 0.20f, var outIdCentralDown, out DockspaceCentralNodeId);
186186

0 commit comments

Comments
 (0)