Skip to content

Commit

Permalink
Merge pull request #37 from kkebo/refactor-pointer
Browse files Browse the repository at this point in the history
refactor: refactor pointer access
  • Loading branch information
kkebo authored Nov 24, 2024
2 parents a988390 + b1e1655 commit 923b128
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/Kernel/Framebuffer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct Framebuffer: ~Copyable {

@inlinable
func drawPoint(x: Int, y: Int, color: UInt32) {
self.pointer.advanced(by: y * Int(self.width) + x).pointee = color
self.pointer[y * Int(self.width) + x] = color
}

func fillRect(x0: Int, y0: Int, x1: Int, y1: Int, color: UInt32) {
Expand Down

0 comments on commit 923b128

Please sign in to comment.