mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-06-06 06:33:37 +00:00
hecl/Compilers: Make use of nullptr over NULL
Same behavior, stricter type.
This commit is contained in:
parent
d59d453db3
commit
2e16f882d2
@ -110,7 +110,7 @@ struct ShaderCompiler<PlatformType::Metal> {
|
|||||||
|
|
||||||
pid_t pid = fork();
|
pid_t pid = fork();
|
||||||
if (!pid) {
|
if (!pid) {
|
||||||
execlp("xcrun", "xcrun", "-sdk", "macosx", "metal", "--version", NULL);
|
execlp("xcrun", "xcrun", "-sdk", "macosx", "metal", "--version", nullptr);
|
||||||
/* xcrun returns 72 if metal command not found;
|
/* xcrun returns 72 if metal command not found;
|
||||||
* emulate that if xcrun not found */
|
* emulate that if xcrun not found */
|
||||||
exit(72);
|
exit(72);
|
||||||
@ -166,7 +166,7 @@ struct ShaderCompiler<PlatformType::Metal> {
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
"-gline-tables-only", "-MO",
|
"-gline-tables-only", "-MO",
|
||||||
#endif
|
#endif
|
||||||
"-", NULL);
|
"-", nullptr);
|
||||||
fmt::print(stderr, fmt("execlp fail {}\n"), strerror(errno));
|
fmt::print(stderr, fmt("execlp fail {}\n"), strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@ -182,7 +182,7 @@ struct ShaderCompiler<PlatformType::Metal> {
|
|||||||
close(compilerIn[1]);
|
close(compilerIn[1]);
|
||||||
|
|
||||||
/* metallib doesn't like outputting to a pipe, so temp file will have to do */
|
/* metallib doesn't like outputting to a pipe, so temp file will have to do */
|
||||||
execlp("xcrun", "xcrun", "-sdk", "macosx", "metallib", "-", "-o", libFile.c_str(), NULL);
|
execlp("xcrun", "xcrun", "-sdk", "macosx", "metallib", "-", "-o", libFile.c_str(), nullptr);
|
||||||
fmt::print(stderr, fmt("execlp fail {}\n"), strerror(errno));
|
fmt::print(stderr, fmt("execlp fail {}\n"), strerror(errno));
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user