Permalink
Browse files

gsdx: Prefix std:: to string and to_string

  • Loading branch information...
turtleli authored and gregory38 committed May 26, 2017
1 parent ada0d57 commit d57b812f36e185edac7c4d6ab8249b4345be8a0a
Showing with 130 additions and 130 deletions.
  1. +1 −1 plugins/GSdx/GLLoader.cpp
  2. +3 −3 plugins/GSdx/GS.cpp
  3. +5 −5 plugins/GSdx/GSCapture.cpp
  4. +2 −2 plugins/GSdx/GSCaptureDlg.cpp
  5. +2 −2 plugins/GSdx/GSCaptureDlg.h
  6. +6 −6 plugins/GSdx/GSCrc.cpp
  7. +1 −1 plugins/GSdx/GSDevice11.cpp
  8. +4 −4 plugins/GSdx/GSDevice9.cpp
  9. +2 −2 plugins/GSdx/GSDevice9.h
  10. +1 −1 plugins/GSdx/GSDeviceDX.h
  11. +9 −9 plugins/GSdx/GSDeviceOGL.cpp
  12. +2 −2 plugins/GSdx/GSDeviceOGL.h
  13. +3 −3 plugins/GSdx/GSDialog.cpp
  14. +1 −1 plugins/GSdx/GSDialog.h
  15. +2 −2 plugins/GSdx/GSFunctionMap.h
  16. +4 −4 plugins/GSdx/GSHwHack.cpp
  17. +1 −1 plugins/GSdx/GSLinuxDialog.cpp
  18. +1 −1 plugins/GSdx/GSLocalMemory.cpp
  19. +1 −1 plugins/GSdx/GSLocalMemory.h
  20. +3 −3 plugins/GSdx/GSPng.cpp
  21. +2 −2 plugins/GSdx/GSPng.h
  22. +3 −3 plugins/GSdx/GSRenderer.cpp
  23. +2 −2 plugins/GSdx/GSRenderer.h
  24. +2 −2 plugins/GSdx/GSRendererCL.cpp
  25. +3 −3 plugins/GSdx/GSRendererCS.cpp
  26. +2 −2 plugins/GSdx/GSRendererHW.cpp
  27. +2 −2 plugins/GSdx/GSRendererOGL.cpp
  28. +2 −2 plugins/GSdx/GSRendererSW.cpp
  29. +1 −1 plugins/GSdx/GSShaderOGL.cpp
  30. +1 −1 plugins/GSdx/GSShaderOGL.h
  31. +3 −3 plugins/GSdx/GSState.cpp
  32. +1 −1 plugins/GSdx/GSState.h
  33. +1 −1 plugins/GSdx/GSTexture.h
  34. +1 −1 plugins/GSdx/GSTexture11.cpp
  35. +1 −1 plugins/GSdx/GSTexture11.h
  36. +1 −1 plugins/GSdx/GSTexture9.cpp
  37. +1 −1 plugins/GSdx/GSTexture9.h
  38. +1 −1 plugins/GSdx/GSTextureCacheSW.cpp
  39. +1 −1 plugins/GSdx/GSTextureCacheSW.h
  40. +4 −4 plugins/GSdx/GSTextureFX11.cpp
  41. +3 −3 plugins/GSdx/GSTextureFX9.cpp
  42. +1 −1 plugins/GSdx/GSTextureNull.h
  43. +1 −1 plugins/GSdx/GSTextureOGL.cpp
  44. +1 −1 plugins/GSdx/GSTextureOGL.h
  45. +1 −1 plugins/GSdx/GSTextureSW.cpp
  46. +1 −1 plugins/GSdx/GSTextureSW.h
  47. +1 −1 plugins/GSdx/GSUniformBufferOGL.h
  48. +3 −3 plugins/GSdx/GSUtil.cpp
  49. +3 −3 plugins/GSdx/GSUtil.h
  50. +2 −2 plugins/GSdx/GSWnd.h
  51. +1 −1 plugins/GSdx/GSWndDX.cpp
  52. +1 −1 plugins/GSdx/GSWndDX.h
  53. +1 −1 plugins/GSdx/GSWndEGL.cpp
  54. +1 −1 plugins/GSdx/GSWndEGL.h
  55. +1 −1 plugins/GSdx/GSWndOGL.cpp
  56. +1 −1 plugins/GSdx/GSWndOGL.h
  57. +1 −1 plugins/GSdx/GSWndWGL.cpp
  58. +1 −1 plugins/GSdx/GSWndWGL.h
  59. +6 −6 plugins/GSdx/GSdx.cpp
  60. +1 −1 plugins/GSdx/GSdx.h
  61. +1 −1 plugins/GSdx/PSX/GPULocalMemory.cpp
  62. +1 −1 plugins/GSdx/PSX/GPULocalMemory.h
  63. +2 −2 plugins/GSdx/PSX/GPURenderer.cpp
  64. +1 −1 plugins/GSdx/PSX/GPURenderer.h
  65. +1 −1 plugins/GSdx/PSX/GPUSettingsDlg.cpp
  66. +3 −3 plugins/GSdx/PSX/GPUState.h
@@ -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;
View
@@ -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)
View
@@ -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)
{
@@ -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);
}
@@ -31,7 +31,7 @@ class GSCaptureDlg : public GSDialog
{
CComPtr<IMoniker> moniker;
CComPtr<IBaseFilter> filter;
wstring FriendlyName;
std::wstring FriendlyName;
_bstr_t DisplayName;
};
@@ -48,7 +48,7 @@ class GSCaptureDlg : public GSDialog
int m_width;
int m_height;
string m_filename;
std::string m_filename;
INT_PTR m_colorspace;
CComPtr<IBaseFilter> m_enc;
};
View
@@ -518,7 +518,7 @@ CRC::Game CRC::m_games[] =
map<uint32, CRC::Game*> CRC::m_map;
string ToLower( string str )
std::string ToLower( std::string str )
{
transform( str.begin(), str.end(), str.begin(), ::tolower);
return str;
@@ -528,19 +528,19 @@ 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)
{
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() );
@@ -256,7 +256,7 @@ bool GSDevice11::Create(const std::shared_ptr<GSWnd> &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);
@@ -265,7 +265,7 @@ bool GSDevice9::Create(const std::shared_ptr<GSWnd> &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<GSWnd> &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<D3D_SHADER_MACRO> 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;
View
@@ -237,8 +237,8 @@ class GSDevice9 : public GSDeviceDX
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) {}
@@ -286,7 +286,7 @@ class GSDeviceDX : public GSDevice
#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;
@@ -393,7 +393,7 @@ bool GSDeviceOGL::Create(const std::shared_ptr<GSWnd> &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<GSWnd> &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<GSWnd> &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,18 +982,18 @@ 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 + "/";
GSmkdir(out.c_str());
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;
@@ -579,8 +579,8 @@ class GSDeviceOGL final : public GSDevice
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);
@@ -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<GSSetting>& settings, int32_t
if(s.value <= maxValue)
{
string str(s.name);
std::string str(s.name);
if(!s.note.empty())
{
View
@@ -45,7 +45,7 @@ class GSDialog
INT_PTR DoModal();
string GetText(UINT id);
std::string GetText(UINT id);
int GetTextAsInt(UINT id);
void SetText(UINT id, const char* str);
@@ -159,7 +159,7 @@ class GSCodeGenerator : public Xbyak::CodeGenerator
template<class CG, class KEY, class VALUE>
class GSCodeGeneratorFunctionMap : public GSFunctionMap<KEY, VALUE>
{
string m_name;
std::string m_name;
void* m_param;
hash_map<uint64, VALUE> m_cgmap;
GSCodeBuffer m_cb;
@@ -219,7 +219,7 @@ class GSCodeGeneratorFunctionMap : public GSFunctionMap<KEY, VALUE>
// 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;
@@ -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 @@ class AutoReloadLibrary
}
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 )
@@ -97,7 +97,7 @@ GtkWidget* CreateComboBoxFromVector(const vector<GSSetting>& 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());
@@ -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;
@@ -917,6 +917,6 @@ class GSLocalMemory : public GSAlignedClass<32>
//
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);
};
Oops, something went wrong.

0 comments on commit d57b812

Please sign in to comment.