Last bit of string cleanup. string.h finally gone.

This commit is contained in:
Ben Vanik
2014-08-17 11:48:29 -07:00
parent 383d3acbb0
commit 24fe169f36
28 changed files with 148 additions and 236 deletions

View File

@@ -99,10 +99,8 @@ ID3D10Blob* D3D11GeometryShader::Compile(const char* shader_source) {
}
uint64_t hash = hash64(shader_source, strlen(shader_source)); // ?
char file_name[poly::max_path];
xesnprintfa(file_name, poly::countof(file_name),
"%s/gen_%.16llX.gs",
base_path,
hash);
snprintf(file_name, poly::countof(file_name), "%s/gen_%.16llX.gs", base_path,
hash);
if (FLAGS_dump_shaders.size()) {
FILE* f = fopen(file_name, "w");

View File

@@ -50,11 +50,8 @@ ID3D10Blob* D3D11ShaderCompile(XE_GPU_SHADER_TYPE type,
}
size_t hash = hash64(disasm_source, strlen(disasm_source)); // ?
char file_name[poly::max_path];
xesnprintfa(file_name, poly::countof(file_name),
"%s/gen_%.16llX.%s",
base_path,
hash,
type == XE_GPU_SHADER_TYPE_VERTEX ? "vs" : "ps");
snprintf(file_name, poly::countof(file_name), "%s/gen_%.16llX.%s", base_path,
hash, type == XE_GPU_SHADER_TYPE_VERTEX ? "vs" : "ps");
if (FLAGS_dump_shaders.size()) {
FILE* f = fopen(file_name, "w");

View File

@@ -48,8 +48,7 @@ private:
void append(const char* format, ...) {
va_list args;
va_start(args, format);
int len = xevsnprintfa(buffer_ + offset_, capacity_ - offset_,
format, args);
int len = vsnprintf(buffer_ + offset_, capacity_ - offset_, format, args);
va_end(args);
offset_ += len;
buffer_[offset_] = 0;

View File

@@ -58,8 +58,7 @@ struct Output {
void append(const char* format, ...) {
va_list args;
va_start(args, format);
int len = xevsnprintfa(
buffer + offset, capacity - offset, format, args);
int len = vsnprintf(buffer + offset, capacity - offset, format, args);
va_end(args);
offset += len;
buffer[offset] = 0;