mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-07-28 03:26:28 +00:00
style: use decl literals
This commit changes a LOT of areas of the code to use decl literals instead of redundantly referring to the type. These changes were mostly driven by some regex searches and then manual adjustment on a case-by-case basis. I almost certainly missed quite a few places where decl literals could be used, but this is a good first step in converting things, and other instances can be addressed when they're discovered. I tested GLFW+Metal and building the framework on macOS and tested a GTK build on Linux, so I'm 99% sure I didn't introduce any syntax errors or other problems with this. (fingers crossed)
This commit is contained in:
@@ -24,9 +24,9 @@ pub const LazyPathList = std.ArrayList(std.Build.LazyPath);
|
||||
pub fn init(b: *std.Build, cfg: *const Config) !SharedDeps {
|
||||
var result: SharedDeps = .{
|
||||
.config = cfg,
|
||||
.help_strings = try HelpStrings.init(b, cfg),
|
||||
.unicode_tables = try UnicodeTables.init(b),
|
||||
.framedata = try GhosttyFrameData.init(b),
|
||||
.help_strings = try .init(b, cfg),
|
||||
.unicode_tables = try .init(b),
|
||||
.framedata = try .init(b),
|
||||
|
||||
// Setup by retarget
|
||||
.options = undefined,
|
||||
@@ -72,7 +72,7 @@ fn initTarget(
|
||||
target: std.Build.ResolvedTarget,
|
||||
) !void {
|
||||
// Update our metallib
|
||||
self.metallib = MetallibStep.create(b, .{
|
||||
self.metallib = .create(b, .{
|
||||
.name = "Ghostty",
|
||||
.target = target,
|
||||
.sources = &.{b.path("src/renderer/shaders/cell.metal")},
|
||||
|
||||
Reference in New Issue
Block a user