diff --git a/Source/Core/AudioCommon/WaveFile.cpp b/Source/Core/AudioCommon/WaveFile.cpp index 42ca8cd3b3..70cdc5aee9 100644 --- a/Source/Core/AudioCommon/WaveFile.cpp +++ b/Source/Core/AudioCommon/WaveFile.cpp @@ -147,7 +147,7 @@ void WaveFileWriter::AddStereoSamplesBE(const short* sample_data, u32 count, int { Stop(); file_index++; - std::stringstream filename; + std::ostringstream filename; filename << File::GetUserPath(D_DUMPAUDIO_IDX) << basename << file_index << ".wav"; Start(filename.str(), sample_rate); current_sample_rate = sample_rate; diff --git a/Source/Core/Common/Debug/Watches.cpp b/Source/Core/Common/Debug/Watches.cpp index 9114f2e83d..a17551f77c 100644 --- a/Source/Core/Common/Debug/Watches.cpp +++ b/Source/Core/Common/Debug/Watches.cpp @@ -104,7 +104,7 @@ std::vector Watches::SaveToStrings() const std::vector watches; for (const auto& watch : m_watches) { - std::stringstream ss; + std::ostringstream ss; ss << std::hex << watch.address << " " << watch.name; watches.push_back(ss.str()); } diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp index 7955c81fdf..3eeb6d04fe 100644 --- a/Source/Core/Common/StringUtil.cpp +++ b/Source/Core/Common/StringUtil.cpp @@ -398,7 +398,7 @@ std::string JoinStrings(const std::vector& strings, const std::stri if (strings.empty()) return ""; - std::stringstream res; + std::ostringstream res; std::copy(strings.begin(), strings.end(), std::ostream_iterator(res, delimiter.c_str())); diff --git a/Source/Core/Core/HW/SI/SI.cpp b/Source/Core/Core/HW/SI/SI.cpp index af72b2c545..89b1724bb9 100644 --- a/Source/Core/Core/HW/SI/SI.cpp +++ b/Source/Core/Core/HW/SI/SI.cpp @@ -307,7 +307,7 @@ static void RunSIBuffer(u64 user_data, s64 cycles_late) s_com_csr.CHANNEL, request_length, expected_response_length, actual_response_length); if (expected_response_length != actual_response_length) { - std::stringstream ss; + std::ostringstream ss; for (u8 b : request_copy) { ss << std::hex << std::setw(2) << std::setfill('0') << (int)b << ' '; diff --git a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp index 0f7fa8c5a8..2247ba000e 100644 --- a/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp +++ b/Source/Core/Core/IOS/USB/Bluetooth/BTReal.cpp @@ -512,7 +512,7 @@ void BluetoothReal::LoadLinkKeys() for (size_t i = 0; i < key_string.length(); i = i + 2) { int value; - std::stringstream(key_string.substr(i, 2)) >> std::hex >> value; + std::istringstream(key_string.substr(i, 2)) >> std::hex >> value; key[pos++] = value; } diff --git a/Source/Core/Core/IOS/USB/OH0/OH0Device.cpp b/Source/Core/Core/IOS/USB/OH0/OH0Device.cpp index 86dccb041f..79504f3d98 100644 --- a/Source/Core/Core/IOS/USB/OH0/OH0Device.cpp +++ b/Source/Core/Core/IOS/USB/OH0/OH0Device.cpp @@ -18,7 +18,7 @@ namespace IOS::HLE::Device { static void GetVidPidFromDevicePath(const std::string& device_path, u16& vid, u16& pid) { - std::stringstream stream{device_path}; + std::istringstream stream{device_path}; std::string segment; std::vector list; while (std::getline(stream, segment, '/')) diff --git a/Source/Core/Core/MemoryWatcher.cpp b/Source/Core/Core/MemoryWatcher.cpp index 3e6e61c227..656ea6b0e3 100644 --- a/Source/Core/Core/MemoryWatcher.cpp +++ b/Source/Core/Core/MemoryWatcher.cpp @@ -50,7 +50,7 @@ void MemoryWatcher::ParseLine(const std::string& line) m_values[line] = 0; m_addresses[line] = std::vector(); - std::stringstream offsets(line); + std::istringstream offsets(line); offsets >> std::hex; u32 offset; while (offsets >> offset) @@ -76,7 +76,7 @@ u32 MemoryWatcher::ChasePointer(const std::string& line) std::string MemoryWatcher::ComposeMessages() { - std::stringstream message_stream; + std::ostringstream message_stream; message_stream << std::hex; for (auto& entry : m_values) diff --git a/Source/Core/Core/Movie.cpp b/Source/Core/Core/Movie.cpp index 3096d963d7..4563ca9dfd 100644 --- a/Source/Core/Core/Movie.cpp +++ b/Source/Core/Core/Movie.cpp @@ -185,7 +185,7 @@ std::string GetRTCDisplay() const time_t current_time = CEXIIPL::GetEmulatedTime(CEXIIPL::UNIX_EPOCH); const tm* const gm_time = gmtime(¤t_time); - std::stringstream format_time; + std::ostringstream format_time; format_time << std::put_time(gm_time, "Date/Time: %c\n"); return format_time.str(); } diff --git a/Source/Core/Core/PowerPC/BreakPoints.cpp b/Source/Core/Core/PowerPC/BreakPoints.cpp index 6366762fcd..a8dc9c5a6e 100644 --- a/Source/Core/Core/PowerPC/BreakPoints.cpp +++ b/Source/Core/Core/PowerPC/BreakPoints.cpp @@ -37,7 +37,7 @@ BreakPoints::TBreakPointsStr BreakPoints::GetStrings() const { if (!bp.is_temporary) { - std::stringstream ss; + std::ostringstream ss; ss << std::hex << bp.address << " " << (bp.is_enabled ? "n" : ""); bp_strings.push_back(ss.str()); } @@ -130,7 +130,7 @@ MemChecks::TMemChecksStr MemChecks::GetStrings() const TMemChecksStr mc_strings; for (const TMemCheck& mc : m_mem_checks) { - std::stringstream ss; + std::ostringstream ss; ss << std::hex << mc.start_address; ss << " " << (mc.is_ranged ? mc.end_address : mc.start_address) << " " << (mc.is_ranged ? "n" : "") << (mc.is_break_on_read ? "r" : "") diff --git a/Source/Core/Core/PowerPC/Jit64/Jit.cpp b/Source/Core/Core/PowerPC/Jit64/Jit.cpp index db5c2711a9..c1330446f4 100644 --- a/Source/Core/Core/PowerPC/Jit64/Jit.cpp +++ b/Source/Core/Core/PowerPC/Jit64/Jit.cpp @@ -1193,7 +1193,7 @@ void LogGeneratedX86(size_t size, const PPCAnalyst::CodeBuffer& code_buffer, con if (b->codeSize <= 250) { - std::stringstream ss; + std::ostringstream ss; ss << std::hex; for (u8 i = 0; i <= b->codeSize; i++) { diff --git a/Source/Core/UICommon/UICommon.cpp b/Source/Core/UICommon/UICommon.cpp index fc2a25bc0f..5b4c1b487c 100644 --- a/Source/Core/UICommon/UICommon.cpp +++ b/Source/Core/UICommon/UICommon.cpp @@ -464,7 +464,7 @@ std::string FormatSize(u64 bytes) // Don't need exact values, only 5 most significant digits const double unit_size = std::pow(2, unit * 10); - std::stringstream ss; + std::ostringstream ss; ss << std::fixed << std::setprecision(2); ss << bytes / unit_size << ' ' << Common::GetStringT(unit_symbols[unit]); return ss.str(); 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& 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()); }