diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2014-03-15 00:57:56 +0100 |
|---|---|---|
| committer | Pierre Bourdon <delroth@gmail.com> | 2014-03-15 00:57:56 +0100 |
| commit | 8d679e76d299956a1521bc14502466be8d8b2df8 (patch) | |
| tree | 97db9ad6a45a8e5d711d7763199579e400a65bc8 /Source/Core/VideoCommon/Debugger.cpp | |
| parent | 12c2e345a35a571aadc842e30c38b3b4d8f70dce (diff) | |
| parent | a82675b7d581421fa80d5d5c53253cf1d5c1a26d (diff) | |
Merge pull request #164 from lioncash/cstr-cull
Kill off some usages of c_str.
Diffstat (limited to 'Source/Core/VideoCommon/Debugger.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Debugger.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Source/Core/VideoCommon/Debugger.cpp b/Source/Core/VideoCommon/Debugger.cpp index 98db44bd05..3197c5dd85 100644 --- a/Source/Core/VideoCommon/Debugger.cpp +++ b/Source/Core/VideoCommon/Debugger.cpp @@ -2,6 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include <string> + #include "Common/FileUtil.h" #include "Common/IniFile.h" @@ -79,10 +81,9 @@ void ContinueGFXDebugger() } -void GFXDebuggerBase::DumpPixelShader(const char* path) +void GFXDebuggerBase::DumpPixelShader(const std::string& path) { - char filename[MAX_PATH]; - sprintf(filename, "%sdump_ps.txt", path); + const std::string filename = StringFromFormat("%sdump_ps.txt", path.c_str()); std::string output; bool useDstAlpha = !g_ActiveConfig.bDstAlphaPass && bpmem.dstalpha.enable && bpmem.blendmode.alphaupdate && bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24; @@ -111,51 +112,50 @@ void GFXDebuggerBase::DumpPixelShader(const char* path) File::WriteStringToFile(output, filename); } -void GFXDebuggerBase::DumpVertexShader(const char* path) +void GFXDebuggerBase::DumpVertexShader(const std::string& path) { - char filename[MAX_PATH]; - sprintf(filename, "%sdump_vs.txt", path); + const std::string filename = StringFromFormat("%sdump_vs.txt", path.c_str()); File::CreateEmptyFile(filename); /// File::WriteStringToFile(GenerateVertexShaderCode(g_nativeVertexFmt->m_components, g_ActiveConfig.backend_info.APIType), filename); } -void GFXDebuggerBase::DumpPixelShaderConstants(const char* path) +void GFXDebuggerBase::DumpPixelShaderConstants(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpVertexShaderConstants(const char* path) +void GFXDebuggerBase::DumpVertexShaderConstants(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpTextures(const char* path) +void GFXDebuggerBase::DumpTextures(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpFrameBuffer(const char* path) +void GFXDebuggerBase::DumpFrameBuffer(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpGeometry(const char* path) +void GFXDebuggerBase::DumpGeometry(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpVertexDecl(const char* path) +void GFXDebuggerBase::DumpVertexDecl(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpMatrices(const char* path) +void GFXDebuggerBase::DumpMatrices(const std::string& path) { // TODO } -void GFXDebuggerBase::DumpStats(const char* path) +void GFXDebuggerBase::DumpStats(const std::string& path) { // TODO } |
