Commit 98ab9fa9 authored by Chun-wei Fan's avatar Chun-wei Fan

MSVC builds: Update string replacement util script

This makes the replace-single function make use of the replace-multi
function, that was just added, to ease future maintenance.
parent 74598919
......@@ -32,11 +32,8 @@ def replace_multi(src, dest, replace_items):
replace_dict[re.escape(], line))
def replace(src, dest, instring, outstring):
with open(src, 'r') as s:
with open(dest, 'w') as d:
for line in s:
i = line.replace(instring, outstring)
replace_item = {instring: outstring}
replace_multi(src, dest, replace_item)
def check_required_args(args, params):
for param in params:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment