diff options
| author | David Korth <gerbilsoft@gerbilsoft.com> | 2019-09-14 16:40:34 -0400 |
|---|---|---|
| committer | David Korth <gerbilsoft@gerbilsoft.com> | 2019-12-29 23:45:02 -0500 |
| commit | c2dd2e8a2e202b3cb63023306569d4f26e293adb (patch) | |
| tree | a555c0cec94121ef93a0861e2ce5c342f525a339 /Source/Core/VideoCommon | |
| parent | 6e549bb6689d967edf4e16f061500f696f35906c (diff) | |
Use std::istringstream or std::ostringstream instead of std::stringstream where possible.
This removes std::iostream from the inheritance chain, which reduces
overhead slightly.
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/PostProcessing.cpp | 6 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureConversionShader.cpp | 4 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VertexManagerBase.cpp | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/PostProcessing.cpp b/Source/Core/VideoCommon/PostProcessing.cpp index 4d7b033f4e..03f913eaaa 100644 --- a/Source/Core/VideoCommon/PostProcessing.cpp +++ b/Source/Core/VideoCommon/PostProcessing.cpp @@ -434,7 +434,7 @@ void PostProcessing::BlitFromTexture(const MathUtil::Rectangle<int>& dst, std::string PostProcessing::GetUniformBufferHeader() const { - std::stringstream ss; + std::ostringstream ss; u32 unused_counter = 1; if (g_ActiveConfig.backend_info.api_type == APIType::D3D) ss << "cbuffer PSBlock : register(b0) {\n"; @@ -493,7 +493,7 @@ std::string PostProcessing::GetUniformBufferHeader() const std::string PostProcessing::GetHeader() const { - std::stringstream ss; + std::ostringstream ss; ss << GetUniformBufferHeader(); if (g_ActiveConfig.backend_info.api_type == APIType::D3D) { @@ -602,7 +602,7 @@ void main(in float3 v_tex0_ : TEXCOORD0, out float4 ocol0_ : SV_Target) bool PostProcessing::CompileVertexShader() { - std::stringstream ss; + std::ostringstream ss; ss << GetUniformBufferHeader(); if (g_ActiveConfig.backend_info.api_type == APIType::D3D) diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp index 9348413fd1..5862d45ac7 100644 --- a/Source/Core/VideoCommon/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/TextureConversionShader.cpp @@ -1392,7 +1392,7 @@ std::string GenerateDecodingShader(TextureFormat format, TLUTFormat palette_form if (!info) return ""; - std::stringstream ss; + std::ostringstream ss; switch (palette_format) { case TLUTFormat::IA8: @@ -1414,7 +1414,7 @@ std::string GenerateDecodingShader(TextureFormat format, TLUTFormat palette_form std::string GeneratePaletteConversionShader(TLUTFormat palette_format, APIType api_type) { - std::stringstream ss; + std::ostringstream ss; ss << R"( int Convert3To8(int v) diff --git a/Source/Core/VideoCommon/VertexManagerBase.cpp b/Source/Core/VideoCommon/VertexManagerBase.cpp index 5addf803d5..7fcd4935c0 100644 --- a/Source/Core/VideoCommon/VertexManagerBase.cpp +++ b/Source/Core/VideoCommon/VertexManagerBase.cpp @@ -768,12 +768,12 @@ void VertexManagerBase::OnEndFrame() #if 0 { - std::stringstream ss; + std::ostringstream ss; std::for_each(m_cpu_accesses_this_frame.begin(), m_cpu_accesses_this_frame.end(), [&ss](u32 idx) { ss << idx << ","; }); WARN_LOG(VIDEO, "CPU EFB accesses in last frame: %s", ss.str().c_str()); } { - std::stringstream ss; + std::ostringstream ss; std::for_each(m_scheduled_command_buffer_kicks.begin(), m_scheduled_command_buffer_kicks.end(), [&ss](u32 idx) { ss << idx << ","; }); WARN_LOG(VIDEO, "Scheduled command buffer kicks: %s", ss.str().c_str()); } |
