Skip to content

Commit

Permalink
Remove warnings for unused variables and duplicate case in enum
Browse files Browse the repository at this point in the history
  • Loading branch information
Killectro committed Sep 23, 2015
1 parent 5654077 commit 7e49e58
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions CVCalendarKit/CVCalendarKitExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public enum Weekday: Int {
func stringValue() -> String {
switch self {
case .Sunday: return "Sunday".localized
case .Sunday: return "Sunday".localized
case .Monday: return "Monday".localized
case .Tuesday: return "Tuesday".localized
case .Wednesday: return "Wednesday".localized
Expand Down Expand Up @@ -170,7 +169,7 @@ public extension NSDate {
- parameter style: String style for the converted date.
- returns: A date description string with the given locale and format.
*/
func descriptionWithLocale(_ locale: NSLocale? = nil, format: DateFormat = .YYMMDD, style: NSDateFormatterStyle?) -> String {
func descriptionWithLocale(locale: NSLocale? = nil, format: DateFormat = .YYMMDD, style: NSDateFormatterStyle?) -> String {
let formatter = NSDateFormatter()
formatter.dateFormat = format.rawValue

Expand Down
6 changes: 3 additions & 3 deletions CVCalendarKit/CVCalendarKitOperators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ private func dateUnitOffset(dateUnit: DateUnit, offset: Int, operation: DateOper
let result: NSDate

switch dateUnit {
case .Year(let date, let value):
case .Year(let date, _):
result = dateWithOffset(date)(Offset(year: offset, month: 0, day: 0), operation)
case .Month(let date, let value):
case .Month(let date, _):
result = dateWithOffset(date)(Offset(year: 0, month: offset, day: 0), operation)
case .Day(let date, let value):
case .Day(let date, _):
result = dateWithOffset(date)(Offset(year: 0, month: 0, day: offset), operation)
}

Expand Down

0 comments on commit 7e49e58

Please sign in to comment.