Skip to content

Commit

Permalink
chore: Minor refactoring
Browse files Browse the repository at this point in the history
May change the shader parsing code to use this code or delete it in
future.
  • Loading branch information
stuartcarnie committed Jul 21, 2022
1 parent 728c7d2 commit a35a785
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Source/ShaderModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ extension ShaderConfigSerialization {
return ShaderModel(passes: passes, textures: textures, parameters: parameters)
}

fileprivate static func makeShaderPassModel(pass i: Int, from d: [String: String]) throws -> ShaderPassModel {
private static func makeShaderPassModel(pass i: Int, from d: [String: String]) throws -> ShaderPassModel {
let key = "shader\(i)"
guard let shader = d[key] else {
throw Errors.missingKey(key)
Expand Down Expand Up @@ -87,7 +87,7 @@ extension ShaderConfigSerialization {
return pass
}

fileprivate static func makeTextures(from d: [String: String]) -> [ShaderTextureModel] {
private static func makeTextures(from d: [String: String]) -> [ShaderTextureModel] {
guard let tv = d["textures"] else {
return []
}
Expand Down Expand Up @@ -120,7 +120,7 @@ extension ShaderConfigSerialization {
return res
}

fileprivate static func makeParameters(from d: [String: String]) -> [ShaderParameterModel] {
private static func makeParameters(from d: [String: String]) -> [ShaderParameterModel] {
guard let pv = d["parameters"] else {
return []
}
Expand Down Expand Up @@ -161,10 +161,6 @@ extension ShaderConfigSerialization {
]
}

extension String {
fileprivate var boolValue: Bool? { Bool(self) }
}

public class ShaderModel {
public var passes: [ShaderPassModel]
public var textures: [ShaderTextureModel]
Expand Down

0 comments on commit a35a785

Please sign in to comment.