提交 ddfa22a6 编写于 作者: R Ray Liu 提交者: GitHub

Merge pull request #1421 from loadingArbert/wayneliu/switchSwiftPB

resolve PMOpDesc&ProgramOptimize warning
......@@ -27,7 +27,7 @@ class PMOpDesc {
var map: [String : [String]] = [:]
for opDescVar in vars {
if (canAdd(opDescVar.parameter)) {
map[opDescVar.parameter] = opDescVar.argumentsArray as! [String]
map[opDescVar.parameter] = opDescVar.argumentsArray as? [String]
}
}
return map
......
......@@ -292,7 +292,7 @@ class ProgramOptimize<P: PrecisionType> {
ops.append(node.opDesc!)
}
var newProgramDesc = PMProgramDesc.init()
let newProgramDesc = PMProgramDesc.init()
let newBlock = PMBlockDesc.init(inVars: block.vars, inOps: ops)
newProgramDesc.blocks.append(newBlock)
return newProgramDesc
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册