Skip to content

Commit

Permalink
Remove unused code and fix periphery
Browse files Browse the repository at this point in the history
  • Loading branch information
LEOYoon-Tsaw committed Jun 23, 2024
1 parent 7f1029e commit ea0f7e4
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
run: brew install peripheryapp/periphery/periphery

- name: Check Unused Code
run: periphery scan --skip-build --index-store-path build/Index.noindex/DataStore
run: periphery scan --relative-results --skip-build --index-store-path build/Index.noindex/DataStore

- name: Upload Squirrel artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: brew install peripheryapp/periphery/periphery

- name: Check Unused Code
run: periphery scan --skip-build --index-store-path build/Index.noindex/DataStore
run: periphery scan --relative-results --skip-build --index-store-path build/Index.noindex/DataStore

- name: Upload Squirrel artifact
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: brew install peripheryapp/periphery/periphery

- name: Check Unused Code
run: periphery scan --skip-build --index-store-path build/Index.noindex/DataStore
run: periphery scan --relative-results --skip-build --index-store-path build/Index.noindex/DataStore

- name: Build changelog
id: release_log
Expand Down
11 changes: 0 additions & 11 deletions sources/BridgingFunctions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ extension NSRange {
}

extension NSPoint {
static func + (lhs: Self, rhs: Self) -> Self {
Self.init(x: lhs.x + rhs.x, y: lhs.y + rhs.y)
}
static func += (lhs: inout Self, rhs: Self) {
lhs.x += rhs.x
lhs.y += rhs.y
Expand All @@ -81,17 +78,9 @@ extension NSPoint {
static func * (lhs: Self, rhs: CGFloat) -> Self {
Self.init(x: lhs.x * rhs, y: lhs.y * rhs)
}
static func *= (lhs: inout Self, rhs: CGFloat) {
lhs.x *= rhs
lhs.y *= rhs
}
static func / (lhs: Self, rhs: CGFloat) -> Self {
Self.init(x: lhs.x / rhs, y: lhs.y / rhs)
}
static func /= (lhs: inout Self, rhs: CGFloat) {
lhs.x /= rhs
lhs.y /= rhs
}
var length: CGFloat {
sqrt(pow(self.x, 2) + pow(self.y, 2))
}
Expand Down
2 changes: 1 addition & 1 deletion sources/SquirrelView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ private extension SquirrelView {
let radius = min(0.5 * theme.pagingOffset, 2 * height / 9)
let effectiveRadius = min(theme.cornerRadius, 0.6 * radius)
guard let trianglePath = drawSmoothLines(
triangle(center: NSPoint(x: 0, y: 0), radius: radius),
triangle(center: .zero, radius: radius),
straightCorner: [], alpha: 0.3 * effectiveRadius, beta: 1.4 * effectiveRadius
) else {
return (layer, nil, nil)
Expand Down

0 comments on commit ea0f7e4

Please sign in to comment.