Skip to content

Commit

Permalink
Renamed methods in new Data extension
Browse files Browse the repository at this point in the history
  • Loading branch information
peterb180369 committed Oct 19, 2018
1 parent 3afbd53 commit e9ffde7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions BXSwiftUtils.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@
D06CC9282178D209009C2991 /* Data+MutationTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC9262178D209009C2991 /* Data+MutationTests.swift */; };
D06CC92B2178EADA009C2991 /* Data+Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC92A2178EADA009C2991 /* Data+Checksum.swift */; };
D06CC92C2178EADA009C2991 /* Data+Checksum.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC92A2178EADA009C2991 /* Data+Checksum.swift */; };
D06CC9392179DDE9009C2991 /* Data+Wrapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC9382179DDE9009C2991 /* Data+Wrapping.swift */; };
D06CC93A2179DDE9009C2991 /* Data+Wrapping.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC9382179DDE9009C2991 /* Data+Wrapping.swift */; };
D06CC9392179DDE9009C2991 /* Data+TypeCasting.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC9382179DDE9009C2991 /* Data+TypeCasting.swift */; };
D06CC93A2179DDE9009C2991 /* Data+TypeCasting.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06CC9382179DDE9009C2991 /* Data+TypeCasting.swift */; };
D06F462D209073D0000986B8 /* Collection+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06F462C209073D0000986B8 /* Collection+Codable.swift */; };
D06F462E209073D0000986B8 /* Collection+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = D06F462C209073D0000986B8 /* Collection+Codable.swift */; };
D0859FD12158F7DD00F624C7 /* URL+Contents.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0859FD02158F7DD00F624C7 /* URL+Contents.swift */; };
Expand Down Expand Up @@ -278,7 +278,7 @@
D06CC9222178C5F9009C2991 /* Data+Mutation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Mutation.swift"; sourceTree = "<group>"; };
D06CC9262178D209009C2991 /* Data+MutationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+MutationTests.swift"; sourceTree = "<group>"; };
D06CC92A2178EADA009C2991 /* Data+Checksum.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Data+Checksum.swift"; sourceTree = "<group>"; };
D06CC9382179DDE9009C2991 /* Data+Wrapping.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+Wrapping.swift"; sourceTree = "<group>"; };
D06CC9382179DDE9009C2991 /* Data+TypeCasting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Data+TypeCasting.swift"; sourceTree = "<group>"; };
D06F462C209073D0000986B8 /* Collection+Codable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Collection+Codable.swift"; sourceTree = "<group>"; };
D0859FD02158F7DD00F624C7 /* URL+Contents.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "URL+Contents.swift"; sourceTree = "<group>"; };
D0859FD32158F7E200F624C7 /* URL+ExtendedAttributes.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "URL+ExtendedAttributes.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -647,7 +647,7 @@
children = (
D06CC92A2178EADA009C2991 /* Data+Checksum.swift */,
D06CC9222178C5F9009C2991 /* Data+Mutation.swift */,
D06CC9382179DDE9009C2991 /* Data+Wrapping.swift */,
D06CC9382179DDE9009C2991 /* Data+TypeCasting.swift */,
);
path = Data;
sourceTree = "<group>";
Expand Down Expand Up @@ -942,7 +942,7 @@
48B6191E215E35DB00E6E037 /* OptionalType.swift in Sources */,
D056D43E205296A500849EF2 /* BXLogger.swift in Sources */,
48DA81D0206BCD92009D1E6C /* Collection+Pluck.swift in Sources */,
D06CC9392179DDE9009C2991 /* Data+Wrapping.swift in Sources */,
D06CC9392179DDE9009C2991 /* Data+TypeCasting.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -1037,7 +1037,7 @@
48C248112088CE9400DC9317 /* NSAttributedString+Codable.swift in Sources */,
D0323500205C2919003D6CCB /* CGPoint+Operators.swift in Sources */,
D0DA3333213DA04A00994E89 /* DispatchGroup+Once.swift in Sources */,
D06CC93A2179DDE9009C2991 /* Data+Wrapping.swift in Sources */,
D06CC93A2179DDE9009C2991 /* Data+TypeCasting.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//**********************************************************************************************************************
//
// Data+Wrapping.swift
// Data+TypeCasting.swift
// Adds methods to convert between Array and Data
// Copyright ©2018 Peter Baumgartner. All rights reserved.
//
Expand All @@ -19,7 +19,7 @@ public extension Data
/// Wraps an Array in a Data object WITHOUT copying the underlying memory
/// - parameter array: An array of values of type T

init<T>(wrapping array: inout [T])
init<T>(usingMemoryOf array: inout [T])
{
let ptr = UnsafeMutableRawPointer(&array)
let count = array.count * MemoryLayout<T>.stride
Expand All @@ -28,9 +28,9 @@ public extension Data


/// Converts a Data object to an Array WITHOUT copying the underlying memory
/// - parameter elementType: The type of the array elements
/// - parameter type: The type of the array elements

func asArray<T>(elementType: T.Type) -> [T]
func asArray<T>(ofType type: T.Type) -> [T]
{
let count = self.count / MemoryLayout<T>.stride

Expand Down

0 comments on commit e9ffde7

Please sign in to comment.