mirror of
https://github.com/vlang/v.git
synced 2025-09-14 23:12:33 +03:00
cleanup: fix old usages of os.write_file/2?
to os.write_file/2!
This commit is contained in:
parent
6a9688ce9d
commit
2c78078814
4 changed files with 10 additions and 10 deletions
12
thirdparty/stdatomic/nix/cpp/gen.v
vendored
12
thirdparty/stdatomic/nix/cpp/gen.v
vendored
|
@ -84,16 +84,16 @@ fn find_file(search_paths []string, file string) ?string {
|
|||
return error('${file} not found')
|
||||
}
|
||||
|
||||
fn patch_atomic(outfile string, infile string) ? {
|
||||
lines := os.read_file(infile)?.split('\n')
|
||||
fn patch_atomic(outfile string, infile string) ! {
|
||||
lines := os.read_file(infile)!.split('\n')
|
||||
outlines := lines.filter(!it.contains('atomic(const atomic&) = delete;'))
|
||||
outtext := outlines.join('\n').replace('#include <bits/atomic_base.h>', '#include "bitsatomicbase.h"')
|
||||
os.write_file(outfile, outtext)?
|
||||
os.write_file(outfile, outtext)!
|
||||
}
|
||||
|
||||
fn patch_bitsatomicbase(outfile string, infile string) ? {
|
||||
lines := os.read_file(infile)?.split('\n')
|
||||
fn patch_bitsatomicbase(outfile string, infile string) ! {
|
||||
lines := os.read_file(infile)!.split('\n')
|
||||
outlines := lines.filter(!it.contains('__atomic_base(const __atomic_base&) = delete;'))
|
||||
outtext := outlines.join('\n').replace('#include <bits/atomic_base.h>', '#include "bitsatomicbase.h"')
|
||||
os.write_file(outfile, outtext)?
|
||||
os.write_file(outfile, outtext)!
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue