-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused code from WordPressShared (#23423)
* Remove WPWalkthroughOverlayView * Remove DateUtils * Remove unused code from NSString-Helpers * Remove UIDevice+Helpers * Remove wp_reduce * Remove WPNUXUtility * Remove WPSharedLogging * Remove unused code from WPStyleGuide * Remove unused code from WPTableViewCell * Remove unused WPShared-Swift header * Remove unused code from WPDeviceIdentification * Remove unused #if SWIFT_PACAKGE imports * Remove unused ConsoleLogger * Remove unused toStringForPageSections * Remove NSMutableData extensions * Remove unused Secret * Remove unwanted commented-out code
- Loading branch information
Showing
52 changed files
with
44 additions
and
1,633 deletions.
There are no files selected for viewing
3 changes: 0 additions & 3 deletions
3
Modules/Sources/WordPressShared/Analytics/AnalyticsEvent.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 1 addition & 12 deletions
13
Modules/Sources/WordPressShared/Utility/CollectionType+Helpers.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,9 @@ | ||
import Foundation | ||
|
||
// MARK: - Collection Type Helpers | ||
// | ||
extension BidirectionalCollection { | ||
public func lastIndex(where predicate: (Self.Iterator.Element) throws -> Bool) rethrows -> Self.Index? { | ||
if let idx = try reversed().firstIndex(where: predicate) { | ||
return self.index(before: idx.base) | ||
} | ||
return nil | ||
} | ||
} | ||
|
||
extension Collection { | ||
/// Returns the element at the specified index if it is within bounds, otherwise nil. | ||
/// | ||
public subscript (safe index: Index) -> Element? { | ||
public subscript(safe index: Index) -> Element? { | ||
return indices.contains(index) ? self[index] : nil | ||
} | ||
} |
24 changes: 0 additions & 24 deletions
24
Modules/Sources/WordPressShared/Utility/ConsoleLogger.swift
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 0 additions & 16 deletions
16
Modules/Sources/WordPressShared/Utility/NSMutableData+Helpers.swift
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
Modules/Sources/WordPressShared/Utility/RichContentFormatter.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
Modules/Sources/WordPressShared/Views/WPStyleGuide+DynamicType.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
Modules/Sources/WordPressShared/Views/WPStyleGuide+SerifFonts.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1 @@ | ||
#if SWIFT_PACKAGE | ||
|
||
@_exported import WordPressSharedObjC | ||
|
||
#endif | ||
|
||
func WPSharedLogError(_ format: String, _ arguments: CVarArg...) { | ||
withVaList(arguments) { WPSharedLogvError(format, $0) } | ||
} | ||
|
||
func WPSharedLogWarning(_ format: String, _ arguments: CVarArg...) { | ||
withVaList(arguments) { WPSharedLogvWarning(format, $0) } | ||
} | ||
|
||
func WPSharedLogInfo(_ format: String, _ arguments: CVarArg...) { | ||
withVaList(arguments) { WPSharedLogvInfo(format, $0) } | ||
} | ||
|
||
func WPSharedLogDebug(_ format: String, _ arguments: CVarArg...) { | ||
withVaList(arguments) { WPSharedLogvDebug(format, $0) } | ||
} | ||
|
||
func WPSharedLogVerbose(_ format: String, _ arguments: CVarArg...) { | ||
withVaList(arguments) { WPSharedLogvVerbose(format, $0) } | ||
} |
49 changes: 0 additions & 49 deletions
49
Modules/Sources/WordPressSharedObjC/Logging/WPSharedLogging.m
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
Modules/Sources/WordPressSharedObjC/Private/WPShared-Swift.h
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.