Don't pass rdcstr through varargs

This commit is contained in:
baldurk
2020-06-19 20:09:27 +01:00
parent 29f54f92f6
commit 274e735428
3 changed files with 12 additions and 10 deletions
@@ -296,14 +296,14 @@ rdcstr getOptMetaString(const Metadata *meta)
rdcstr DIFile::toString() const
{
return StringFormat::Fmt("!DIFile(filename: %s, directory: %s)", getOptMetaString(file),
getOptMetaString(dir));
return StringFormat::Fmt("!DIFile(filename: %s, directory: %s)", getOptMetaString(file).c_str(),
getOptMetaString(dir).c_str());
}
rdcstr DICompileUnit::toString() const
{
rdcstr ret = StringFormat::Fmt("!DICompileUnit(language: %s, file: %s", ToStr(lang).c_str(),
file ? file->refString() : "null");
file ? file->refString().c_str() : "null");
if(producer)
ret += ", producer: " + escapeString(*producer);
@@ -1558,7 +1558,7 @@ rdcstr DebugLocation::toString() const
rdcstr ret = StringFormat::Fmt("!DILocation(line: %llu, column: %llu, scope: %s", line, col,
scope ? scope->refString().c_str() : "null");
if(inlinedAt)
ret += StringFormat::Fmt(", inlinedAt: %s", inlinedAt->refString());
ret += StringFormat::Fmt(", inlinedAt: %s", inlinedAt->refString().c_str());
ret += ")";
return ret;
}
@@ -802,9 +802,10 @@ DXBC::Reflection *Program::GetReflection()
if(dx.valver && dx.valver->children.size() == 1 && dx.valver->children[0]->children.size() == 2)
{
m_CompilerSig += StringFormat::Fmt(" (Validation version %s.%s)",
dx.valver->children[0]->children[0]->constant->toString(),
dx.valver->children[0]->children[1]->constant->toString());
m_CompilerSig +=
StringFormat::Fmt(" (Validation version %s.%s)",
dx.valver->children[0]->children[0]->constant->toString().c_str(),
dx.valver->children[0]->children[1]->constant->toString().c_str());
}
if(dx.entryPoints && dx.entryPoints->children.size() > 0 &&
@@ -821,9 +822,10 @@ DXBC::Reflection *Program::GetReflection()
if(dx.shaderModel && dx.shaderModel->children.size() == 1 &&
dx.shaderModel->children[0]->children.size() == 3)
{
m_Profile = StringFormat::Fmt("%s_%s_%s", dx.shaderModel->children[0]->children[0]->str,
dx.shaderModel->children[0]->children[1]->constant->toString(),
dx.shaderModel->children[0]->children[2]->constant->toString());
m_Profile =
StringFormat::Fmt("%s_%s_%s", dx.shaderModel->children[0]->children[0]->str.c_str(),
dx.shaderModel->children[0]->children[1]->constant->toString().c_str(),
dx.shaderModel->children[0]->children[2]->constant->toString().c_str());
}
else
{