diff --git a/plugins/GSdx/GLLoader.cpp b/plugins/GSdx/GLLoader.cpp index 5be37f18b0..0dd1ed69ea 100644 --- a/plugins/GSdx/GLLoader.cpp +++ b/plugins/GSdx/GLLoader.cpp @@ -390,7 +390,7 @@ namespace GLLoader { if (glGetStringi && max_ext) { for (GLint i = 0; i < max_ext; i++) { - string ext((const char*)glGetStringi(GL_EXTENSIONS, i)); + std::string ext{(const char*)glGetStringi(GL_EXTENSIONS, i)}; // Bonus if (ext.compare("GL_EXT_texture_filter_anisotropic") == 0) found_GL_EXT_texture_filter_anisotropic = true; if (ext.compare("GL_NVX_gpu_memory_info") == 0) found_GL_NVX_gpu_memory_info = true; diff --git a/plugins/GSdx/GS.cpp b/plugins/GSdx/GS.cpp index 5d13bcc90a..f3058ea201 100644 --- a/plugins/GSdx/GS.cpp +++ b/plugins/GSdx/GS.cpp @@ -753,7 +753,7 @@ EXPORT_C_(uint32) GSmakeSnapshot(char* path) { try { - string s(path); + std::string s{path}; if(!s.empty() && s[s.length() - 1] != DIRECTORY_SEPARATOR) { @@ -941,7 +941,7 @@ EXPORT_C GSgetLastTag(uint32* tag) EXPORT_C GSgetTitleInfo2(char* dest, size_t length) { - string s = "GSdx"; + std::string s{"GSdx"}; s.append(s_renderer_name).append(s_renderer_type); // TODO: this gets called from a different thread concurrently with GSOpen (on linux) @@ -993,7 +993,7 @@ EXPORT_C GSsetExclusive(int enabled) class Console { HANDLE m_console; - string m_title; + std::string m_title; public: Console::Console(LPCSTR title, bool open) diff --git a/plugins/GSdx/GSCapture.cpp b/plugins/GSdx/GSCapture.cpp index ed875c54ae..53a44c1f70 100644 --- a/plugins/GSdx/GSCapture.cpp +++ b/plugins/GSdx/GSCapture.cpp @@ -401,7 +401,7 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float m_size.x = (dlg.m_width + 7) & ~7; m_size.y = (dlg.m_height + 7) & ~7; - wstring fn(dlg.m_filename.begin(), dlg.m_filename.end()); + std::wstring fn{dlg.m_filename.begin(), dlg.m_filename.end()}; // @@ -446,8 +446,8 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float { CFilterInfo fi; pBF->QueryFilterInfo(&fi); - wstring s(fi.achName); - printf("Filter [%p]: %s\n", pBF.p, string(s.begin(), s.end()).c_str()); + std::wstring s{fi.achName}; + printf("Filter [%p]: %s\n", pBF.p, std::string{s.begin(), s.end()}.c_str()); BeginEnumPins(pBF, pEP, pPin) { @@ -456,8 +456,8 @@ bool GSCapture::BeginCapture(float fps, GSVector2i recommendedResolution, float CPinInfo pi; pPin->QueryPinInfo(&pi); - wstring s(pi.achName); - printf("- Pin [%p - %p]: %s (%s)\n", pPin.p, pPinTo.p, string(s.begin(), s.end()).c_str(), pi.dir ? "out" : "in"); + std::wstring s{pi.achName}; + printf("- Pin [%p - %p]: %s (%s)\n", pPin.p, pPinTo.p, std::string{s.begin(), s.end()}.c_str(), pi.dir ? "out" : "in"); BeginEnumMediaTypes(pPin, pEMT, pmt) { diff --git a/plugins/GSdx/GSCaptureDlg.cpp b/plugins/GSdx/GSCaptureDlg.cpp index 5466326086..7fcfe37d69 100644 --- a/plugins/GSdx/GSCaptureDlg.cpp +++ b/plugins/GSdx/GSCaptureDlg.cpp @@ -79,7 +79,7 @@ void GSCaptureDlg::OnInit() c.moniker = moniker; - wstring prefix; + std::wstring prefix; LPOLESTR str = NULL; @@ -108,7 +108,7 @@ void GSCaptureDlg::OnInit() m_codecs.push_back(c); - string s(c.FriendlyName.begin(), c.FriendlyName.end()); + std::string s{c.FriendlyName.begin(), c.FriendlyName.end()}; ComboBoxAppend(IDC_CODECS, s.c_str(), (LPARAM)&m_codecs.back(), c.DisplayName == selected); } diff --git a/plugins/GSdx/GSCaptureDlg.h b/plugins/GSdx/GSCaptureDlg.h index 36c80ba6f8..813ade1f14 100644 --- a/plugins/GSdx/GSCaptureDlg.h +++ b/plugins/GSdx/GSCaptureDlg.h @@ -31,7 +31,7 @@ class GSCaptureDlg : public GSDialog { CComPtr moniker; CComPtr filter; - wstring FriendlyName; + std::wstring FriendlyName; _bstr_t DisplayName; }; @@ -48,7 +48,7 @@ public: int m_width; int m_height; - string m_filename; + std::string m_filename; INT_PTR m_colorspace; CComPtr m_enc; }; diff --git a/plugins/GSdx/GSCrc.cpp b/plugins/GSdx/GSCrc.cpp index e9f1e71de9..820bebe0c8 100644 --- a/plugins/GSdx/GSCrc.cpp +++ b/plugins/GSdx/GSCrc.cpp @@ -518,7 +518,7 @@ CRC::Game CRC::m_games[] = map CRC::m_map; -string ToLower( string str ) +std::string ToLower( std::string str ) { transform( str.begin(), str.end(), str.begin(), ::tolower); return str; @@ -528,11 +528,11 @@ string ToLower( string str ) // The list is case insensitive and order insensitive. // E.g. Disable all CRC hacks: CrcHacksExclusions=all // E.g. Disable hacks for these CRCs: CrcHacksExclusions=0x0F0C4A9C, 0x0EE5646B, 0x7ACF7E03 -bool IsCrcExcluded(string exclusionList, uint32 crc) +bool IsCrcExcluded(std::string exclusionList, uint32 crc) { - string target = format( "0x%08x", crc ); - exclusionList = ToLower( exclusionList ); - return ( exclusionList.find( target ) != string::npos || exclusionList.find( "all" ) != string::npos ); + std::string target = format("0x%08x", crc); + exclusionList = ToLower(exclusionList); + return exclusionList.find(target) != std::string::npos || exclusionList.find("all") != std::string::npos; } CRC::Game CRC::Lookup(uint32 crc) @@ -540,7 +540,7 @@ CRC::Game CRC::Lookup(uint32 crc) printf("GSdx Lookup CRC:%X\n", crc); if(m_map.empty()) { - string exclusions = theApp.GetConfigS("CrcHacksExclusions"); + std::string exclusions = theApp.GetConfigS("CrcHacksExclusions"); if (exclusions.length() != 0) printf( "GSdx: CrcHacksExclusions: %s\n", exclusions.c_str() ); diff --git a/plugins/GSdx/GSDevice11.cpp b/plugins/GSdx/GSDevice11.cpp index 3f7ce1d435..ddc71d38e6 100644 --- a/plugins/GSdx/GSDevice11.cpp +++ b/plugins/GSdx/GSDevice11.cpp @@ -256,7 +256,7 @@ bool GSDevice11::Create(const std::shared_ptr &wnd) int ShadeBoost_Brightness = theApp.GetConfigI("ShadeBoost_Brightness"); int ShadeBoost_Saturation = theApp.GetConfigI("ShadeBoost_Saturation"); - string str[3]; + std::string str[3]; str[0] = format("%d", ShadeBoost_Saturation); str[1] = format("%d", ShadeBoost_Brightness); diff --git a/plugins/GSdx/GSDevice9.cpp b/plugins/GSdx/GSDevice9.cpp index 9f18ba8682..d2b39d507f 100644 --- a/plugins/GSdx/GSDevice9.cpp +++ b/plugins/GSdx/GSDevice9.cpp @@ -265,7 +265,7 @@ bool GSDevice9::Create(const std::shared_ptr &wnd) } else { - string s = format( + std::string s = format( "Supported pixel shader version is too low!\n\nSupported: %d.%d\nNeeded: 2.0 or higher", D3DSHADER_VERSION_MAJOR(m_d3dcaps.PixelShaderVersion), D3DSHADER_VERSION_MINOR(m_d3dcaps.PixelShaderVersion)); @@ -354,7 +354,7 @@ bool GSDevice9::Create(const std::shared_ptr &wnd) int ShadeBoost_Brightness = theApp.GetConfigI("ShadeBoost_Brightness"); int ShadeBoost_Saturation = theApp.GetConfigI("ShadeBoost_Saturation"); - string str[3]; + std::string str[3]; str[0] = format("%d", ShadeBoost_Saturation); str[1] = format("%d", ShadeBoost_Brightness); @@ -1454,7 +1454,7 @@ void GSDevice9::OMSetRenderTargets(GSTexture* rt, GSTexture* ds, const GSVector4 } } -void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il) +void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il) { vector m; @@ -1490,7 +1490,7 @@ void GSDevice9::CompileShader(const char *source, size_t size, const char *filen } } -void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps) +void GSDevice9::CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps) { uint32 flags = 0; diff --git a/plugins/GSdx/GSDevice9.h b/plugins/GSdx/GSDevice9.h index 9b72d6f76f..20863806d7 100644 --- a/plugins/GSdx/GSDevice9.h +++ b/plugins/GSdx/GSDevice9.h @@ -237,8 +237,8 @@ public: IDirect3DDevice9* operator->() {return m_dev;} operator IDirect3DDevice9*() {return m_dev;} - void CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il); - void CompileShader(const char *source, size_t size, const char *filename, const string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps); + void CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DVertexShader9** vs, const D3DVERTEXELEMENT9* layout, int count, IDirect3DVertexDeclaration9** il); + void CompileShader(const char *source, size_t size, const char *filename, const std::string& entry, const D3D_SHADER_MACRO* macro, IDirect3DPixelShader9** ps); void SetupVS(VSSelector sel, const VSConstantBuffer* cb); void SetupGS(GSSelector sel, const GSConstantBuffer* cb) {} diff --git a/plugins/GSdx/GSDeviceDX.h b/plugins/GSdx/GSDeviceDX.h index f75d607f1c..f20eb1048e 100644 --- a/plugins/GSdx/GSDeviceDX.h +++ b/plugins/GSdx/GSDeviceDX.h @@ -286,7 +286,7 @@ public: #pragma pack(pop) protected: - struct {D3D_FEATURE_LEVEL level; string model, vs, gs, ps, cs;} m_shader; + struct {D3D_FEATURE_LEVEL level; std::string model, vs, gs, ps, cs;} m_shader; uint32 m_msaa; DXGI_SAMPLE_DESC m_msaa_desc; diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 01f0adb762..adaa53d50a 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -393,7 +393,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr &wnd) m_convert.vs = vs; for(size_t i = 0; i < countof(m_convert.ps); i++) { ps = m_shader->Compile("convert.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data()); - string pretty_name = "Convert pipe " + to_string(i); + std::string pretty_name = "Convert pipe " + std::to_string(i); m_convert.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps); } @@ -422,7 +422,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr &wnd) for(size_t i = 0; i < countof(m_merge_obj.ps); i++) { ps = m_shader->Compile("merge.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data()); - string pretty_name = "Merge pipe " + to_string(i); + std::string pretty_name = "Merge pipe " + std::to_string(i); m_merge_obj.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps); } } @@ -439,7 +439,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr &wnd) for(size_t i = 0; i < countof(m_interlace.ps); i++) { ps = m_shader->Compile("interlace.glsl", format("ps_main%d", i), GL_FRAGMENT_SHADER, shader.data()); - string pretty_name = "Interlace pipe " + to_string(i); + std::string pretty_name = "Interlace pipe " + std::to_string(i); m_interlace.ps[i] = m_shader->LinkPipeline(pretty_name, vs, 0, ps); } } @@ -982,10 +982,10 @@ GLuint GSDeviceOGL::CompilePS(PSSelector sel) return m_shader->Compile("tfx.glsl", "ps_main", GL_FRAGMENT_SHADER, m_shader_tfx_fs.data(), macro); } -void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const PSSelector& sel, int& nb_shader) +void GSDeviceOGL::SelfShaderTestRun(const std::string& dir, const std::string& file, const PSSelector& sel, int& nb_shader) { #ifdef __unix__ - string out = "/tmp/GSdx_Shader/"; + std::string out = "/tmp/GSdx_Shader/"; GSmkdir(out.c_str()); out += dir + "/"; @@ -993,7 +993,7 @@ void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const out += file; #else - string out = file; + std::string out = file; #endif #ifdef __linux__ @@ -1017,7 +1017,7 @@ void GSDeviceOGL::SelfShaderTestRun(const string& dir, const string& file, const #endif } -void GSDeviceOGL::SelfShaderTestPrint(const string& test, int& nb_shader) +void GSDeviceOGL::SelfShaderTestPrint(const std::string& test, int& nb_shader) { fprintf(stderr, "%-25s\t\t%d shaders:\t%d instructions (M %4.2f)\t%d registers (M %4.2f)\n", test.c_str(), nb_shader, @@ -1031,13 +1031,13 @@ void GSDeviceOGL::SelfShaderTestPrint(const string& test, int& nb_shader) void GSDeviceOGL::SelfShaderTest() { - string out = ""; + std::string out; #ifdef __unix__ setenv("NV50_PROG_DEBUG", "1", 1); #endif - string test; + std::string test; m_shader_inst = 0; m_shader_reg = 0; int nb_shader = 0; diff --git a/plugins/GSdx/GSDeviceOGL.h b/plugins/GSdx/GSDeviceOGL.h index 932e6a9bde..0e584513ce 100644 --- a/plugins/GSdx/GSDeviceOGL.h +++ b/plugins/GSdx/GSDeviceOGL.h @@ -579,8 +579,8 @@ public: GLuint CreateSampler(PSSamplerSelector sel); GSDepthStencilOGL* CreateDepthStencil(OMDepthStencilSelector dssel); - void SelfShaderTestPrint(const string& test, int& nb_shader); - void SelfShaderTestRun(const string& dir, const string& file, const PSSelector& sel, int& nb_shader); + void SelfShaderTestPrint(const std::string& test, int& nb_shader); + void SelfShaderTestRun(const std::string& dir, const std::string& file, const PSSelector& sel, int& nb_shader); void SelfShaderTest(); void SetupIA(const void* vertex, int vertex_count, const uint32* index, int index_count, int prim); diff --git a/plugins/GSdx/GSDialog.cpp b/plugins/GSdx/GSDialog.cpp index 1c1f46a751..dd33101714 100644 --- a/plugins/GSdx/GSDialog.cpp +++ b/plugins/GSdx/GSDialog.cpp @@ -125,9 +125,9 @@ bool GSDialog::OnCommand(HWND hWnd, UINT id, UINT code) return false; } -string GSDialog::GetText(UINT id) +std::string GSDialog::GetText(UINT id) { - string s; + std::string s; char* buff = NULL; @@ -183,7 +183,7 @@ void GSDialog::ComboBoxInit(UINT id, const vector& settings, int32_t if(s.value <= maxValue) { - string str(s.name); + std::string str(s.name); if(!s.note.empty()) { diff --git a/plugins/GSdx/GSDialog.h b/plugins/GSdx/GSDialog.h index 905db3e9df..9f8c4332eb 100644 --- a/plugins/GSdx/GSDialog.h +++ b/plugins/GSdx/GSDialog.h @@ -45,7 +45,7 @@ public: INT_PTR DoModal(); - string GetText(UINT id); + std::string GetText(UINT id); int GetTextAsInt(UINT id); void SetText(UINT id, const char* str); diff --git a/plugins/GSdx/GSFunctionMap.h b/plugins/GSdx/GSFunctionMap.h index 2e4204293c..a1b1d3d210 100644 --- a/plugins/GSdx/GSFunctionMap.h +++ b/plugins/GSdx/GSFunctionMap.h @@ -159,7 +159,7 @@ public: template class GSCodeGeneratorFunctionMap : public GSFunctionMap { - string m_name; + std::string m_name; void* m_param; hash_map m_cgmap; GSCodeBuffer m_cb; @@ -219,7 +219,7 @@ public: // if(iJIT_IsProfilingActive()) // always > 0 { - string name = format("%s<%016llx>()", m_name.c_str(), (uint64)key); + std::string name = format("%s<%016llx>()", m_name.c_str(), (uint64)key); iJIT_Method_Load ml; diff --git a/plugins/GSdx/GSHwHack.cpp b/plugins/GSdx/GSHwHack.cpp index 05fa88fd9a..99441a61ef 100644 --- a/plugins/GSdx/GSHwHack.cpp +++ b/plugins/GSdx/GSHwHack.cpp @@ -2274,15 +2274,15 @@ bool GSC_SSX3(const GSFrameInfo& fi, int& skip) class AutoReloadLibrary { private: - string m_dllPath, m_loadedDllPath; + std::string m_dllPath, m_loadedDllPath; DWORD m_minMsBetweenProbes; time_t m_lastFileModification; DWORD m_lastProbe; HMODULE m_library; - string GetTempName() + std::string GetTempName() { - string result = m_loadedDllPath + ".tmp"; //default name + std::string result = m_loadedDllPath + ".tmp"; //default name TCHAR tmpPath[MAX_PATH], tmpName[MAX_PATH]; DWORD ret = GetTempPath(MAX_PATH, tmpPath); if(ret && ret <= MAX_PATH && GetTempFileName(tmpPath, TEXT("GSdx"), 0, tmpName)) @@ -2305,7 +2305,7 @@ private: } public: - AutoReloadLibrary( const string dllPath, const int minMsBetweenProbes=100 ) + AutoReloadLibrary( const std::string dllPath, const int minMsBetweenProbes=100 ) : m_minMsBetweenProbes( minMsBetweenProbes ) , m_dllPath( dllPath ) , m_lastFileModification( 0 ) diff --git a/plugins/GSdx/GSLinuxDialog.cpp b/plugins/GSdx/GSLinuxDialog.cpp index 61b0cfae43..9a05c9249b 100644 --- a/plugins/GSdx/GSLinuxDialog.cpp +++ b/plugins/GSdx/GSLinuxDialog.cpp @@ -97,7 +97,7 @@ GtkWidget* CreateComboBoxFromVector(const vector& s, const char* opt_ for(size_t i = 0; i < s.size(); i++) { - string label = s[i].name; + std::string label = s[i].name; if(!s[i].note.empty()) label += format(" (%s)", s[i].note.c_str()); diff --git a/plugins/GSdx/GSLocalMemory.cpp b/plugins/GSdx/GSLocalMemory.cpp index 85ff645259..7384712a19 100644 --- a/plugins/GSdx/GSLocalMemory.cpp +++ b/plugins/GSdx/GSLocalMemory.cpp @@ -2012,7 +2012,7 @@ void GSLocalMemory::ReadTextureBlock4HHP(uint32 bp, uint8* dst, int dstpitch, co #include "GSTextureSW.h" -void GSLocalMemory::SaveBMP(const string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h) +void GSLocalMemory::SaveBMP(const std::string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h) { int pitch = w * 4; int size = pitch * h; diff --git a/plugins/GSdx/GSLocalMemory.h b/plugins/GSdx/GSLocalMemory.h index 3db0a4deef..4e2ddd0d5c 100644 --- a/plugins/GSdx/GSLocalMemory.h +++ b/plugins/GSdx/GSLocalMemory.h @@ -917,6 +917,6 @@ public: // - void SaveBMP(const string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h); + void SaveBMP(const std::string& fn, uint32 bp, uint32 bw, uint32 psm, int w, int h); }; diff --git a/plugins/GSdx/GSPng.cpp b/plugins/GSdx/GSPng.cpp index d4caf52edf..4c43694b75 100644 --- a/plugins/GSdx/GSPng.cpp +++ b/plugins/GSdx/GSPng.cpp @@ -41,7 +41,7 @@ struct { namespace GSPng { - bool SaveFile(const string& file, const Format fmt, const uint8* const image, + bool SaveFile(const std::string& file, const Format fmt, const uint8* const image, uint8* const row, const int width, const int height, const int pitch, const int compression, const bool rb_swapped = false, const bool first_image = false) { @@ -104,7 +104,7 @@ namespace GSPng { return success; } - bool Save(GSPng::Format fmt, const string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped) + bool Save(GSPng::Format fmt, const std::string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped) { std::string root = file; root.replace(file.length() - 4, 4, ""); @@ -128,7 +128,7 @@ namespace GSPng { return SaveFile(filename, fmt, image, row.get(), w, h, pitch, compression); } - Transaction::Transaction(GSPng::Format fmt, const string& file, const uint8* image, int w, int h, int pitch, int compression) + Transaction::Transaction(GSPng::Format fmt, const std::string& file, const uint8* image, int w, int h, int pitch, int compression) : m_fmt(fmt), m_file(file), m_w(w), m_h(h), m_pitch(pitch), m_compression(compression) { // Note: yes it would be better to use shared pointer diff --git a/plugins/GSdx/GSPng.h b/plugins/GSdx/GSPng.h index c0b918dc23..6046317ae8 100644 --- a/plugins/GSdx/GSPng.h +++ b/plugins/GSdx/GSPng.h @@ -46,11 +46,11 @@ namespace GSPng { int m_pitch; int m_compression; - Transaction(GSPng::Format fmt, const string& file, const uint8* image, int w, int h, int pitch, int compression); + Transaction(GSPng::Format fmt, const std::string& file, const uint8* image, int w, int h, int pitch, int compression); ~Transaction(); }; - bool Save(GSPng::Format fmt, const string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped = false); + bool Save(GSPng::Format fmt, const std::string& file, uint8* image, int w, int h, int pitch, int compression, bool rb_swapped = false); void Process(std::shared_ptr &item); diff --git a/plugins/GSdx/GSRenderer.cpp b/plugins/GSdx/GSRenderer.cpp index 5d78bb442b..004d640b1f 100644 --- a/plugins/GSdx/GSRenderer.cpp +++ b/plugins/GSdx/GSRenderer.cpp @@ -346,7 +346,7 @@ void GSRenderer::VSync(int field) double fps = 1000.0f / m_perfmon.Get(GSPerfMon::Frame); - string s; + std::string s; #ifdef GSTITLEINFO_API_FORCE_VERBOSE if(1)//force verbose reply @@ -356,7 +356,7 @@ void GSRenderer::VSync(int field) { //GSdx owns the window's title, be verbose. - string s2 = m_regs->SMODE2.INT ? (string("Interlaced ") + (m_regs->SMODE2.FFMD ? "(frame)" : "(field)")) : "Progressive"; + std::string s2 = m_regs->SMODE2.INT ? (std::string("Interlaced ") + (m_regs->SMODE2.FFMD ? "(frame)" : "(field)")) : "Progressive"; s = format( "%lld | %d x %d | %.2f fps (%d%%) | %s - %s | %s | %d S/%d P/%d D | %d%% CPU | %.2f | %.2f", @@ -508,7 +508,7 @@ void GSRenderer::VSync(int field) } } -bool GSRenderer::MakeSnapshot(const string& path) +bool GSRenderer::MakeSnapshot(const std::string& path) { if(m_snapshot.empty()) { diff --git a/plugins/GSdx/GSRenderer.h b/plugins/GSdx/GSRenderer.h index 855fcedc5b..e618e1a980 100644 --- a/plugins/GSdx/GSRenderer.h +++ b/plugins/GSdx/GSRenderer.h @@ -29,7 +29,7 @@ class GSRenderer : public GSState { GSCapture m_capture; - string m_snapshot; + std::string m_snapshot; int m_shader; bool Merge(int field); @@ -62,7 +62,7 @@ public: virtual bool CreateDevice(GSDevice* dev); virtual void ResetDevice(); virtual void VSync(int field); - virtual bool MakeSnapshot(const string& path); + virtual bool MakeSnapshot(const std::string& path); virtual void KeyEvent(GSKeyEventData* e); virtual bool CanUpscale() {return false;} virtual int GetUpscaleMultiplier() {return 1;} diff --git a/plugins/GSdx/GSRendererCL.cpp b/plugins/GSdx/GSRendererCL.cpp index 54eab37944..f2c0409728 100644 --- a/plugins/GSdx/GSRendererCL.cpp +++ b/plugins/GSdx/GSRendererCL.cpp @@ -2009,7 +2009,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt) { for(auto d : devs) { - string path = d.tmppath + "/" + entry; + std::string path = d.tmppath + "/" + entry; FILE* f = fopen(path.c_str(), "rb"); @@ -2092,7 +2092,7 @@ cl::Kernel GSRendererCL::CL::Build(const char* entry, ostringstream& opt) for(size_t i = 0; i < binaries.size(); i++) { - string path = devs[i].tmppath + "/" + entry; + std::string path = devs[i].tmppath + "/" + entry; FILE* f = fopen(path.c_str(), "wb"); diff --git a/plugins/GSdx/GSRendererCS.cpp b/plugins/GSdx/GSRendererCS.cpp index a5c9935071..d5ebb5cb7d 100644 --- a/plugins/GSdx/GSRendererCS.cpp +++ b/plugins/GSdx/GSRendererCS.cpp @@ -509,7 +509,7 @@ void GSRendererCS::Draw() } else { - string str[2]; + std::string str[2]; str[0] = format("%d", vs_sel.tme); str[1] = format("%d", vs_sel.fst); @@ -566,7 +566,7 @@ void GSRendererCS::Draw() } else { - string str[2]; + std::string str[2]; str[0] = format("%d", gs_sel.iip); str[1] = format("%d", j == 0 ? gs_sel.prim : GS_SPRITE_CLASS); @@ -605,7 +605,7 @@ void GSRendererCS::Draw() } else { - string str[15]; + std::string str[15]; str[0] = format("%d", PS_BATCH_SIZE); str[1] = format("%d", context->FRAME.PSM); diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index 3bd7148998..32cf373112 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -869,7 +869,7 @@ void GSRendererHW::Draw() { uint64 frame = m_perfmon.GetFrame(); - string s; + std::string s; if (s_n >= s_saven) { // Dump Register state @@ -1039,7 +1039,7 @@ void GSRendererHW::Draw() { uint64 frame = m_perfmon.GetFrame(); - string s; + std::string s; if(s_save && s_n >= s_saven) { diff --git a/plugins/GSdx/GSRendererOGL.cpp b/plugins/GSdx/GSRendererOGL.cpp index 042bc54646..866fea57b9 100644 --- a/plugins/GSdx/GSRendererOGL.cpp +++ b/plugins/GSdx/GSRendererOGL.cpp @@ -1010,9 +1010,9 @@ void GSRendererOGL::SendDraw() for (const auto& it: m_drawlist) ++frequency[it]; - string message; + std::string message; for (const auto& it: frequency) - message += " " + to_string(it.first) + "(" + to_string(it.second) + ")"; + message += " " + std::to_string(it.first) + "(" + std::to_string(it.second) + ")"; GL_PERF("Split single draw (%d sprites) into %zu draws: consecutive draws(frequency):%s", m_index.tail / nb_vertex, m_drawlist.size(), message.c_str()); diff --git a/plugins/GSdx/GSRendererSW.cpp b/plugins/GSdx/GSRendererSW.cpp index 4a39ac1e3f..3ee7bc8b5d 100644 --- a/plugins/GSdx/GSRendererSW.cpp +++ b/plugins/GSdx/GSRendererSW.cpp @@ -488,7 +488,7 @@ void GSRendererSW::Draw() // It will breaks the few games that really uses 16 bits RT bool texture_shuffle = ((context->FRAME.PSM & 0x2) && ((context->TEX0.PSM & 3) == 2) && (m_vt.m_primclass == GS_SPRITE_CLASS)); - string s; + std::string s; if(s_n >= s_saven) { @@ -1539,7 +1539,7 @@ void GSRendererSW::SharedData::UpdateSource() { uint64 frame = m_parent->m_perfmon.GetFrame(); - string s; + std::string s; if(m_parent->s_savet && m_parent->s_n >= m_parent->s_saven) { diff --git a/plugins/GSdx/GSShaderOGL.cpp b/plugins/GSdx/GSShaderOGL.cpp index e26dc8ccf8..5d8b53a1c1 100644 --- a/plugins/GSdx/GSShaderOGL.cpp +++ b/plugins/GSdx/GSShaderOGL.cpp @@ -50,7 +50,7 @@ GSShaderOGL::~GSShaderOGL() glDeleteProgramPipelines(m_pipe_to_delete.size(), &m_pipe_to_delete[0]); } -GLuint GSShaderOGL::LinkPipeline(const string& pretty_print, GLuint vs, GLuint gs, GLuint ps) +GLuint GSShaderOGL::LinkPipeline(const std::string& pretty_print, GLuint vs, GLuint gs, GLuint ps) { GLuint p; glCreateProgramPipelines(1, &p); diff --git a/plugins/GSdx/GSShaderOGL.h b/plugins/GSdx/GSShaderOGL.h index 5af7fb253f..b4191edbdd 100644 --- a/plugins/GSdx/GSShaderOGL.h +++ b/plugins/GSdx/GSShaderOGL.h @@ -45,7 +45,7 @@ class GSShaderOGL { void BindPipeline(GLuint pipe); GLuint Compile(const std::string& glsl_file, const std::string& entry, GLenum type, const char* glsl_h_code, const std::string& macro_sel = ""); - GLuint LinkPipeline(const string& pretty_print, GLuint vs, GLuint gs, GLuint ps); + GLuint LinkPipeline(const std::string& pretty_print, GLuint vs, GLuint gs, GLuint ps); // Same as above but for not separated build void BindProgram(GLuint vs, GLuint gs, GLuint ps); diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index f828235ec8..8d80952cf1 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -1553,7 +1553,7 @@ void GSState::FlushWrite() */ /* static int n = 0; - string s; + std::string s; s = format("c:\\temp1\\[%04d]_%05x_%d_%d_%d_%d_%d_%d.bmp", n++, (int)m_env.BITBLTBUF.DBP, (int)m_env.BITBLTBUF.DBW, (int)m_env.BITBLTBUF.DPSM, r.left, r.top, r.right, r.bottom); @@ -1750,7 +1750,7 @@ void GSState::Write(const uint8* mem, int len) /* static int n = 0; - string s; + std::string s; s = format("c:\\temp1\\[%04d]_%05x_%d_%d_%d_%d_%d_%d.bmp", n++, (int)blit.DBP, (int)blit.DBW, (int)blit.DPSM, r.left, r.top, r.right, r.bottom); @@ -1831,7 +1831,7 @@ void GSState::Read(uint8* mem, int len) m_mem.ReadImageX(m_tr.x, m_tr.y, mem, len, m_env.BITBLTBUF, m_env.TRXPOS, m_env.TRXREG); if(s_dump && s_save && s_n >= s_saven) { - string s= m_dump_root + format("%05d_read_%05x_%d_%d_%d_%d_%d_%d.bmp", + std::string s = m_dump_root + format("%05d_read_%05x_%d_%d_%d_%d_%d_%d.bmp", s_n, (int)m_env.BITBLTBUF.SBP, (int)m_env.BITBLTBUF.SBW, (int)m_env.BITBLTBUF.SPSM, r.left, r.top, r.right, r.bottom); m_mem.SaveBMP(s, m_env.BITBLTBUF.SBP, m_env.BITBLTBUF.SBW, m_env.BITBLTBUF.SPSM, r.right, r.bottom); diff --git a/plugins/GSdx/GSState.h b/plugins/GSdx/GSState.h index 93387f6570..511aa42228 100644 --- a/plugins/GSdx/GSState.h +++ b/plugins/GSdx/GSState.h @@ -233,7 +233,7 @@ public: bool s_savef; int s_saven; int s_savel; - string m_dump_root; + std::string m_dump_root; public: GSState(); diff --git a/plugins/GSdx/GSTexture.h b/plugins/GSdx/GSTexture.h index 51b5598602..c437439441 100644 --- a/plugins/GSdx/GSTexture.h +++ b/plugins/GSdx/GSTexture.h @@ -47,7 +47,7 @@ public: virtual bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) = 0; virtual void Unmap() = 0; virtual void GenerateMipmap() {} - virtual bool Save(const string& fn, bool dds = false) = 0; + virtual bool Save(const std::string& fn, bool dds = false) = 0; virtual uint32 GetID() { return 0; } GSVector2 GetScale() const {return m_scale;} diff --git a/plugins/GSdx/GSTexture11.cpp b/plugins/GSdx/GSTexture11.cpp index c2d5c27c96..6372b3a9fd 100644 --- a/plugins/GSdx/GSTexture11.cpp +++ b/plugins/GSdx/GSTexture11.cpp @@ -93,7 +93,7 @@ void GSTexture11::Unmap() } } -bool GSTexture11::Save(const string& fn, bool dds) +bool GSTexture11::Save(const std::string& fn, bool dds) { CComPtr res; D3D11_TEXTURE2D_DESC desc; diff --git a/plugins/GSdx/GSTexture11.h b/plugins/GSdx/GSTexture11.h index a37dbf8ee3..221eb3f775 100644 --- a/plugins/GSdx/GSTexture11.h +++ b/plugins/GSdx/GSTexture11.h @@ -40,7 +40,7 @@ public: bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0); bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0); void Unmap(); - bool Save(const string& fn, bool dds = false); + bool Save(const std::string& fn, bool dds = false); operator ID3D11Texture2D*(); operator ID3D11ShaderResourceView*(); diff --git a/plugins/GSdx/GSTexture9.cpp b/plugins/GSdx/GSTexture9.cpp index 49ff5be6f5..6e4162edc2 100644 --- a/plugins/GSdx/GSTexture9.cpp +++ b/plugins/GSdx/GSTexture9.cpp @@ -142,7 +142,7 @@ void GSTexture9::Unmap() } } -bool GSTexture9::Save(const string& fn, bool dds) +bool GSTexture9::Save(const std::string& fn, bool dds) { bool rb_swapped = true; CComPtr surface; diff --git a/plugins/GSdx/GSTexture9.h b/plugins/GSdx/GSTexture9.h index 12995caa8f..a071b6a4f0 100644 --- a/plugins/GSdx/GSTexture9.h +++ b/plugins/GSdx/GSTexture9.h @@ -38,7 +38,7 @@ public: bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0); bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0); void Unmap(); - bool Save(const string& fn, bool dds = false); + bool Save(const std::string& fn, bool dds = false); operator IDirect3DSurface9*(); operator IDirect3DTexture9*(); diff --git a/plugins/GSdx/GSTextureCacheSW.cpp b/plugins/GSdx/GSTextureCacheSW.cpp index 22a19e969f..1a839c71fe 100644 --- a/plugins/GSdx/GSTextureCacheSW.cpp +++ b/plugins/GSdx/GSTextureCacheSW.cpp @@ -306,7 +306,7 @@ bool GSTextureCacheSW::Texture::Update(const GSVector4i& rect) #include "GSTextureSW.h" -bool GSTextureCacheSW::Texture::Save(const string& fn, bool dds) const +bool GSTextureCacheSW::Texture::Save(const std::string& fn, bool dds) const { const uint32* RESTRICT clut = m_state->m_mem.m_clut; diff --git a/plugins/GSdx/GSTextureCacheSW.h b/plugins/GSdx/GSTextureCacheSW.h index d6454bb59e..3212819e6c 100644 --- a/plugins/GSdx/GSTextureCacheSW.h +++ b/plugins/GSdx/GSTextureCacheSW.h @@ -53,7 +53,7 @@ public: virtual ~Texture(); bool Update(const GSVector4i& r); - bool Save(const string& fn, bool dds = false) const; + bool Save(const std::string& fn, bool dds = false) const; }; protected: diff --git a/plugins/GSdx/GSTextureFX11.cpp b/plugins/GSdx/GSTextureFX11.cpp index a5f6ab492e..0cb1524d8b 100644 --- a/plugins/GSdx/GSTextureFX11.cpp +++ b/plugins/GSdx/GSTextureFX11.cpp @@ -103,7 +103,7 @@ void GSDevice11::SetupVS(VSSelector sel, const VSConstantBuffer* cb) if(i == m_vs.end()) { - string str[4]; + std::string str[4]; str[0] = format("%d", sel.bppz); str[1] = format("%d", sel.tme); @@ -168,7 +168,7 @@ void GSDevice11::SetupGS(GSSelector sel, const GSConstantBuffer* cb) } else { - string str[4]; + std::string str[4]; str[0] = format("%d", sel.iip); str[1] = format("%d", sel.prim); @@ -209,7 +209,7 @@ void GSDevice11::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSe if(i == m_ps.end()) { - string str[21]; + std::string str[21]; str[0] = format("%d", sel.fst); str[1] = format("%d", sel.wms); @@ -430,7 +430,7 @@ void GSDevice11::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uin { (bsel.a == 0 ? bd.RenderTarget[0].SrcBlend : bd.RenderTarget[0].DestBlend) = D3D11_BLEND_ONE; - const string afixstr = format("%d >> 7", afix); + const std::string afixstr = format("%d >> 7", afix); const char *col[3] = {"Cs", "Cd", "0"}; const char *alpha[3] = {"As", "Ad", afixstr.c_str()}; diff --git a/plugins/GSdx/GSTextureFX9.cpp b/plugins/GSdx/GSTextureFX9.cpp index 5869a3f1fb..1637d33ff7 100644 --- a/plugins/GSdx/GSTextureFX9.cpp +++ b/plugins/GSdx/GSTextureFX9.cpp @@ -67,7 +67,7 @@ void GSDevice9::SetupVS(VSSelector sel, const VSConstantBuffer* cb) if(i == m_vs.end()) { - string str[5]; + std::string str[5]; str[0] = format("%d", sel.bppz); str[1] = format("%d", sel.tme); @@ -137,7 +137,7 @@ void GSDevice9::SetupPS(PSSelector sel, const PSConstantBuffer* cb, PSSamplerSel if(i == m_ps.end()) { - string str[18]; + std::string str[18]; str[0] = format("%d", sel.fst); str[1] = format("%d", sel.wms); @@ -323,7 +323,7 @@ void GSDevice9::SetupOM(OMDepthStencilSelector dssel, OMBlendSelector bsel, uint { (bsel.a == 0 ? bs->SrcBlend : bs->DestBlend) = D3DBLEND_ONE; - const string afixstr = format("%d >> 7", afix); + const std::string afixstr = format("%d >> 7", afix); const char *col[3] = {"Cs", "Cd", "0"}; const char *alpha[3] = {"As", "Ad", afixstr.c_str()}; diff --git a/plugins/GSdx/GSTextureNull.h b/plugins/GSdx/GSTextureNull.h index ebc3deb557..0f1d457ad4 100644 --- a/plugins/GSdx/GSTextureNull.h +++ b/plugins/GSdx/GSTextureNull.h @@ -37,5 +37,5 @@ public: bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0) {return true;} bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) {return false;} void Unmap() {} - bool Save(const string& fn, bool dds = false) {return false;} + bool Save(const std::string& fn, bool dds = false) {return false;} }; diff --git a/plugins/GSdx/GSTextureOGL.cpp b/plugins/GSdx/GSTextureOGL.cpp index 63c011ffa3..8dee468cb7 100644 --- a/plugins/GSdx/GSTextureOGL.cpp +++ b/plugins/GSdx/GSTextureOGL.cpp @@ -463,7 +463,7 @@ void GSTextureOGL::GenerateMipmap() } } -bool GSTextureOGL::Save(const string& fn, bool dds) +bool GSTextureOGL::Save(const std::string& fn, bool dds) { // Collect the texture data uint32 pitch = 4 * m_size.x; diff --git a/plugins/GSdx/GSTextureOGL.h b/plugins/GSdx/GSTextureOGL.h index 8ea6b83a7d..1cfa039f22 100644 --- a/plugins/GSdx/GSTextureOGL.h +++ b/plugins/GSdx/GSTextureOGL.h @@ -72,7 +72,7 @@ class GSTextureOGL final : public GSTexture bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0) final; void Unmap() final; void GenerateMipmap() final; - bool Save(const string& fn, bool dds = false) final; + bool Save(const std::string& fn, bool dds = false) final; bool IsBackbuffer() { return (m_type == GSTexture::Backbuffer); } bool IsDss() { return (m_type == GSTexture::DepthStencil); } diff --git a/plugins/GSdx/GSTextureSW.cpp b/plugins/GSdx/GSTextureSW.cpp index 395e76c285..6b1da1be99 100644 --- a/plugins/GSdx/GSTextureSW.cpp +++ b/plugins/GSdx/GSTextureSW.cpp @@ -85,7 +85,7 @@ void GSTextureSW::Unmap() m_mapped.clear(std::memory_order_release); } -bool GSTextureSW::Save(const string& fn, bool dds) +bool GSTextureSW::Save(const std::string& fn, bool dds) { if(dds) return false; // not implemented diff --git a/plugins/GSdx/GSTextureSW.h b/plugins/GSdx/GSTextureSW.h index 977bdea672..aa54be4ace 100644 --- a/plugins/GSdx/GSTextureSW.h +++ b/plugins/GSdx/GSTextureSW.h @@ -38,5 +38,5 @@ public: bool Update(const GSVector4i& r, const void* data, int pitch, int layer = 0); bool Map(GSMap& m, const GSVector4i* r = NULL, int layer = 0); void Unmap(); - bool Save(const string& fn, bool dds = false); + bool Save(const std::string& fn, bool dds = false); }; diff --git a/plugins/GSdx/GSUniformBufferOGL.h b/plugins/GSdx/GSUniformBufferOGL.h index c6b3c43da9..8c8b51773a 100644 --- a/plugins/GSdx/GSUniformBufferOGL.h +++ b/plugins/GSdx/GSUniformBufferOGL.h @@ -35,7 +35,7 @@ class GSUniformBufferOGL { uint8* m_cache; // content of the previous upload public: - GSUniformBufferOGL(const string& pretty_name, GLuint index, uint32 size) + GSUniformBufferOGL(const std::string& pretty_name, GLuint index, uint32 size) : m_index(index), m_size(size) { glGenBuffers(1, &m_buffer); diff --git a/plugins/GSdx/GSUtil.cpp b/plugins/GSdx/GSUtil.cpp index 23f919f44c..77b6c2e104 100644 --- a/plugins/GSdx/GSUtil.cpp +++ b/plugins/GSdx/GSUtil.cpp @@ -275,7 +275,7 @@ void GSUtil::GetDeviceDescs(list& dl) for(auto& device : ds) { - string type; + std::string type; switch(device.getInfo()) { @@ -317,13 +317,13 @@ void GSUtil::GetDeviceDescs(list& dl) } } -string GSUtil::GetDeviceUniqueName(cl::Device& device) +std::string GSUtil::GetDeviceUniqueName(cl::Device& device) { std::string vendor = device.getInfo(); std::string name = device.getInfo(); std::string version = device.getInfo(); - string type; + std::string type; switch(device.getInfo()) { diff --git a/plugins/GSdx/GSUtil.h b/plugins/GSdx/GSUtil.h index 035d62bc3a..4d9e28c9ac 100644 --- a/plugins/GSdx/GSUtil.h +++ b/plugins/GSdx/GSUtil.h @@ -29,9 +29,9 @@ struct OCLDeviceDesc #ifdef ENABLE_OPENCL cl::Device device; #endif - string name; + std::string name; int version; - string tmppath; + std::string tmppath; }; class GSUtil @@ -56,7 +56,7 @@ public: #ifdef ENABLE_OPENCL static void GetDeviceDescs(list& dl); - static string GetDeviceUniqueName(cl::Device& device); + static std::string GetDeviceUniqueName(cl::Device& device); #endif #ifdef _WIN32 diff --git a/plugins/GSdx/GSWnd.h b/plugins/GSdx/GSWnd.h index 2277046171..08fa3f93d2 100644 --- a/plugins/GSdx/GSWnd.h +++ b/plugins/GSdx/GSWnd.h @@ -34,7 +34,7 @@ public: GSWnd() : m_managed(false) {}; virtual ~GSWnd() {}; - virtual bool Create(const string& title, int w, int h) = 0; + virtual bool Create(const std::string& title, int w, int h) = 0; virtual bool Attach(void* handle, bool managed = true) = 0; virtual void Detach() = 0; bool IsManaged() const {return m_managed;} @@ -76,7 +76,7 @@ public: GSWndGL() : m_ctx_attached(false), m_vsync_change_requested(false), m_vsync(0) {}; virtual ~GSWndGL() {}; - virtual bool Create(const string& title, int w, int h) = 0; + virtual bool Create(const std::string& title, int w, int h) = 0; virtual bool Attach(void* handle, bool managed = true) = 0; virtual void Detach() = 0; diff --git a/plugins/GSdx/GSWndDX.cpp b/plugins/GSdx/GSWndDX.cpp index 7b5a2d1343..8bdcdb0773 100644 --- a/plugins/GSdx/GSWndDX.cpp +++ b/plugins/GSdx/GSWndDX.cpp @@ -79,7 +79,7 @@ LRESULT GSWndDX::OnMessage(UINT message, WPARAM wParam, LPARAM lParam) return DefWindowProc((HWND)m_hWnd, message, wParam, lParam); } -bool GSWndDX::Create(const string& title, int w, int h) +bool GSWndDX::Create(const std::string& title, int w, int h) { if(m_hWnd) throw GSDXRecoverableError(); diff --git a/plugins/GSdx/GSWndDX.h b/plugins/GSdx/GSWndDX.h index 1cc96138e0..c2e0119549 100644 --- a/plugins/GSdx/GSWndDX.h +++ b/plugins/GSdx/GSWndDX.h @@ -36,7 +36,7 @@ public: GSWndDX(); virtual ~GSWndDX(); - bool Create(const string& title, int w, int h); + bool Create(const std::string& title, int w, int h); bool Attach(void* handle, bool managed = true); void Detach(); diff --git a/plugins/GSdx/GSWndEGL.cpp b/plugins/GSdx/GSWndEGL.cpp index 2a69b46009..1cf75552bf 100644 --- a/plugins/GSdx/GSWndEGL.cpp +++ b/plugins/GSdx/GSWndEGL.cpp @@ -196,7 +196,7 @@ void GSWndEGL::Detach() DestroyNativeResources(); } -bool GSWndEGL::Create(const string& title, int w, int h) +bool GSWndEGL::Create(const std::string& title, int w, int h) { if(w <= 0 || h <= 0) { w = theApp.GetConfigI("ModeWidth"); diff --git a/plugins/GSdx/GSWndEGL.h b/plugins/GSdx/GSWndEGL.h index b2752c34f6..02ece1c652 100644 --- a/plugins/GSdx/GSWndEGL.h +++ b/plugins/GSdx/GSWndEGL.h @@ -52,7 +52,7 @@ public: GSWndEGL(int platform); virtual ~GSWndEGL() {}; - bool Create(const string& title, int w, int h) final; + bool Create(const std::string& title, int w, int h) final; bool Attach(void* handle, bool managed = true) final; void Detach() final; diff --git a/plugins/GSdx/GSWndOGL.cpp b/plugins/GSdx/GSWndOGL.cpp index 22c58c081d..4af94ec8f2 100644 --- a/plugins/GSdx/GSWndOGL.cpp +++ b/plugins/GSdx/GSWndOGL.cpp @@ -156,7 +156,7 @@ void GSWndOGL::Detach() } } -bool GSWndOGL::Create(const string& title, int w, int h) +bool GSWndOGL::Create(const std::string& title, int w, int h) { if(m_NativeWindow) throw GSDXRecoverableError(); diff --git a/plugins/GSdx/GSWndOGL.h b/plugins/GSdx/GSWndOGL.h index 2ddd3fe3ed..9a821863a1 100644 --- a/plugins/GSdx/GSWndOGL.h +++ b/plugins/GSdx/GSWndOGL.h @@ -45,7 +45,7 @@ public: GSWndOGL(); virtual ~GSWndOGL() {}; - bool Create(const string& title, int w, int h); + bool Create(const std::string& title, int w, int h); bool Attach(void* handle, bool managed = true); void Detach(); diff --git a/plugins/GSdx/GSWndWGL.cpp b/plugins/GSdx/GSWndWGL.cpp index 4679568b40..ef08ebac79 100644 --- a/plugins/GSdx/GSWndWGL.cpp +++ b/plugins/GSdx/GSWndWGL.cpp @@ -237,7 +237,7 @@ void GSWndWGL::CloseWGLDisplay() // Used by GSReplay. At least for now. // More or less copy pasted from GSWndDX::Create and GSWndWGL::Attach with a few // modifications -bool GSWndWGL::Create(const string& title, int w, int h) +bool GSWndWGL::Create(const std::string& title, int w, int h) { if(m_NativeWindow) return false; diff --git a/plugins/GSdx/GSWndWGL.h b/plugins/GSdx/GSWndWGL.h index 7dca2cd83a..feb1ba7b2a 100644 --- a/plugins/GSdx/GSWndWGL.h +++ b/plugins/GSdx/GSWndWGL.h @@ -47,7 +47,7 @@ public: GSWndWGL(); virtual ~GSWndWGL() {}; - bool Create(const string& title, int w, int h); + bool Create(const std::string& title, int w, int h); bool Attach(void* handle, bool managed = true); void Detach(); diff --git a/plugins/GSdx/GSdx.cpp b/plugins/GSdx/GSdx.cpp index 6d9b6598fb..acf33122ad 100644 --- a/plugins/GSdx/GSdx.cpp +++ b/plugins/GSdx/GSdx.cpp @@ -366,7 +366,7 @@ void GSdxApp::Init() m_default_configuration["dump"] = "0"; m_default_configuration["extrathreads"] = "2"; m_default_configuration["extrathreads_height"] = "4"; - m_default_configuration["filter"] = to_string(static_cast(BiFiltering::PS2)); + m_default_configuration["filter"] = std::to_string(static_cast(BiFiltering::PS2)); m_default_configuration["force_texture_clear"] = "0"; m_default_configuration["fxaa"] = "0"; m_default_configuration["interlace"] = "7"; @@ -404,9 +404,9 @@ void GSdxApp::Init() m_default_configuration["override_GL_ARB_texture_barrier"] = "-1"; m_default_configuration["override_GL_EXT_texture_filter_anisotropic"] = "-1"; m_default_configuration["paltex"] = "0"; - m_default_configuration["png_compression_level"] = to_string(Z_BEST_SPEED); + m_default_configuration["png_compression_level"] = std::to_string(Z_BEST_SPEED); m_default_configuration["preload_frame_with_gs_data"] = "0"; - m_default_configuration["Renderer"] = to_string(static_cast(GSRendererType::Default)); + m_default_configuration["Renderer"] = std::to_string(static_cast(GSRendererType::Default)); m_default_configuration["resx"] = "1024"; m_default_configuration["resy"] = "1024"; m_default_configuration["save"] = "0"; @@ -441,7 +441,7 @@ void GSdxApp::Init() m_default_configuration["UserHacks_SpriteHack"] = "0"; m_default_configuration["UserHacks_TCOffset"] = "0"; m_default_configuration["UserHacks_TextureInsideRt"] = "0"; - m_default_configuration["UserHacks_TriFilter"] = to_string(static_cast(TriFiltering::None)); + m_default_configuration["UserHacks_TriFilter"] = std::to_string(static_cast(TriFiltering::None)); m_default_configuration["UserHacks_WildHack"] = "0"; m_default_configuration["wrap_gs_mem"] = "0"; m_default_configuration["vsync"] = "0"; @@ -511,7 +511,7 @@ void GSdxApp::SetConfigDir(const char* dir) } } -string GSdxApp::GetConfigS(const char* entry) +std::string GSdxApp::GetConfigS(const char* entry) { char buff[4096] = {0}; auto def = m_default_configuration.find(entry); @@ -523,7 +523,7 @@ string GSdxApp::GetConfigS(const char* entry) GetPrivateProfileString(m_section.c_str(), entry, "", buff, countof(buff), m_ini.c_str()); } - return string(buff); + return {buff}; } void GSdxApp::SetConfig(const char* entry, const char* value) diff --git a/plugins/GSdx/GSdx.h b/plugins/GSdx/GSdx.h index 7cb1824788..14d972d2b5 100644 --- a/plugins/GSdx/GSdx.h +++ b/plugins/GSdx/GSdx.h @@ -62,7 +62,7 @@ public: T GetConfigT(const char* entry) { return static_cast(GetConfigI(entry)); } int GetConfigI(const char* entry); bool GetConfigB(const char* entry); - string GetConfigS(const char* entry); + std::string GetConfigS(const char* entry); void SetCurrentRendererType(GSRendererType type); GSRendererType GetCurrentRendererType(); diff --git a/plugins/GSdx/PSX/GPULocalMemory.cpp b/plugins/GSdx/PSX/GPULocalMemory.cpp index 4ce7779034..d524861c99 100644 --- a/plugins/GSdx/PSX/GPULocalMemory.cpp +++ b/plugins/GSdx/PSX/GPULocalMemory.cpp @@ -583,7 +583,7 @@ void GPULocalMemory::Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst, #include "GSTextureSW.h" -void GPULocalMemory::SaveBMP(const string& fn, const GSVector4i& r2, int tp, int cx, int cy) +void GPULocalMemory::SaveBMP(const std::string& fn, const GSVector4i& r2, int tp, int cx, int cy) { GSVector4i r; diff --git a/plugins/GSdx/PSX/GPULocalMemory.h b/plugins/GSdx/PSX/GPULocalMemory.h index 3f5bf0b673..f9c31ef87b 100644 --- a/plugins/GSdx/PSX/GPULocalMemory.h +++ b/plugins/GSdx/PSX/GPULocalMemory.h @@ -82,5 +82,5 @@ public: void Expand16(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels); void Expand24(const uint16* RESTRICT src, uint32* RESTRICT dst, int pixels); - void SaveBMP(const string& fn, const GSVector4i& r, int tp, int cx, int cy); + void SaveBMP(const std::string& fn, const GSVector4i& r, int tp, int cx, int cy); }; diff --git a/plugins/GSdx/PSX/GPURenderer.cpp b/plugins/GSdx/PSX/GPURenderer.cpp index 83b636f33f..1cad120e3d 100644 --- a/plugins/GSdx/PSX/GPURenderer.cpp +++ b/plugins/GSdx/PSX/GPURenderer.cpp @@ -183,7 +183,7 @@ void GPURenderer::VSync() int w = r.width() << m_scale.x; int h = r.height() << m_scale.y; - string s = format( + std::string s = format( "%lld | %d x %d | %.2f fps (%d%%) | %d/%d | %d%% CPU | %.2f | %.2f", m_perfmon.GetFrame(), w, h, fps, (int)(100.0 * fps / m_env.GetFPS()), (int)m_perfmon.Get(GSPerfMon::Prim), @@ -208,7 +208,7 @@ void GPURenderer::VSync() m_dev->Present(r.fit(m_aspectratio), 0); } -bool GPURenderer::MakeSnapshot(const string& path) +bool GPURenderer::MakeSnapshot(const std::string& path) { time_t t = time(NULL); diff --git a/plugins/GSdx/PSX/GPURenderer.h b/plugins/GSdx/PSX/GPURenderer.h index 57188f4e1e..680cc45a70 100644 --- a/plugins/GSdx/PSX/GPURenderer.h +++ b/plugins/GSdx/PSX/GPURenderer.h @@ -65,7 +65,7 @@ public: virtual bool Create(void* hWnd); virtual void VSync(); - virtual bool MakeSnapshot(const string& path); + virtual bool MakeSnapshot(const std::string& path); }; template diff --git a/plugins/GSdx/PSX/GPUSettingsDlg.cpp b/plugins/GSdx/PSX/GPUSettingsDlg.cpp index 9e01910b71..7393817dd6 100644 --- a/plugins/GSdx/PSX/GPUSettingsDlg.cpp +++ b/plugins/GSdx/PSX/GPUSettingsDlg.cpp @@ -58,7 +58,7 @@ void GPUSettingsDlg::OnInit() { m_modes.push_back(mode); - string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate); + std::string str = format("%dx%d %dHz", mode.Width, mode.Height, mode.RefreshRate); ComboBoxAppend(IDC_RESOLUTION, str.c_str(), (LPARAM)&m_modes.back(), w == mode.Width && h == mode.Height && hz == mode.RefreshRate); } diff --git a/plugins/GSdx/PSX/GPUState.h b/plugins/GSdx/PSX/GPUState.h index 5e9059ac3e..26b1a273ea 100644 --- a/plugins/GSdx/PSX/GPUState.h +++ b/plugins/GSdx/PSX/GPUState.h @@ -89,7 +89,7 @@ protected: int s_n; bool dump_enable = false; - void Dump(const string& s, uint32 TP, const GSVector4i& r, int inc = true) + void Dump(const std::string& s, uint32 TP, const GSVector4i& r, int inc = true) { //if(m_perfmon.GetFrame() < 1000) //if((m_env.TWIN.u32 & 0xfffff) == 0) @@ -105,12 +105,12 @@ protected: #ifdef DEBUG dir = 2; #endif - string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str()); + std::string path = format("c:\\temp%d\\%04d_%s.bmp", dir, s_n, s.c_str()); m_mem.SaveBMP(path, r, TP, m_env.CLUT.X, m_env.CLUT.Y); } - void Dump(const string& s, int inc = true) + void Dump(const std::string& s, int inc = true) { Dump(s, 2, GSVector4i(0, 0, 1024, 512), inc); }