Skip to content

Commit

Permalink
removed parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
wickwirew committed May 11, 2017
1 parent 563e43b commit d1f70b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Sources/Reflection/Set.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/// Set value for key of an instance
public func set(_ value: Any, key: String, for instance: inout Any, instanceType: Any.Type? = nil) throws {
let type = instanceType ?? type(of: instance)
try property(type: type(of: instance), key: key).write(value, to: mutableStorage(instance: &instance, type: type))
public func set(_ value: Any, key: String, for instance: inout Any) throws {
let type = type(of: instance)
try property(type: type, key: key).write(value, to: mutableStorage(instance: &instance, type: type))
}

/// Set value for key of an instance
Expand Down
1 change: 0 additions & 1 deletion Sources/Reflection/Storage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,3 @@ func storage<T>(instance: inout T, type: Any.Type) -> UnsafeRawPointer {
}
}
}

0 comments on commit d1f70b7

Please sign in to comment.