mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-29 04:01:27 +01:00
FEX: Convert sstream to fextl
This commit is contained in:
1 parent
e5867b89ed
commit
1877457c4d
4 files changed
+11
-10
No files matched your search
@@ -10,13 +10,13 @@ $end_info$
|
||||
#include <FEXCore/Utils/Allocator.h>
|
||||
#include <FEXCore/Utils/LogManager.h>
|
||||
#include <FEXCore/Utils/MathUtils.h>
|
||||
#include <FEXCore/fextl/sstream.h>
|
||||
#include <FEXCore/fextl/vector.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <elf.h>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
@@ -41,7 +41,7 @@ void ELFSymbolDatabase::FillLibrarySearchPaths() {
|
||||
auto EnvVar = getenv("LD_LIBRARY_PATH");
|
||||
if (EnvVar) {
|
||||
std::string Env = EnvVar;
|
||||
std::stringstream EnvStream(Env);
|
||||
fextl::stringstream EnvStream(Env);
|
||||
std::string Token;
|
||||
while (std::getline(EnvStream, Token, ';')) {
|
||||
LibrarySearchPaths.emplace_back(Token);
|
||||
|
||||
@@ -25,6 +25,7 @@ $end_info$
|
||||
#include <FEXCore/Utils/Telemetry.h>
|
||||
#include <FEXCore/Utils/Threads.h>
|
||||
#include <FEXCore/Utils/Profiler.h>
|
||||
#include <FEXCore/fextl/sstream.h>
|
||||
#include <FEXCore/fextl/string.h>
|
||||
#include <FEXCore/fextl/vector.h>
|
||||
|
||||
@@ -42,7 +43,6 @@ $end_info$
|
||||
#include <mutex>
|
||||
#include <queue>
|
||||
#include <set>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <sys/auxv.h>
|
||||
#include <sys/resource.h>
|
||||
@@ -148,7 +148,7 @@ void InterpreterHandler(fextl::string *Filename, fextl::string const &RootFS, fe
|
||||
fextl::vector<fextl::string> ShebangArguments{};
|
||||
|
||||
// Shebang line can have a single argument
|
||||
std::istringstream InterpreterSS(InterpreterLine);
|
||||
fextl::istringstream InterpreterSS(InterpreterLine);
|
||||
fextl::string Argument;
|
||||
while (std::getline(InterpreterSS, Argument, ' ')) {
|
||||
if (Argument.empty()) {
|
||||
|
||||
@@ -14,6 +14,7 @@ $end_info$
|
||||
#include <FEXCore/Core/Context.h>
|
||||
#include <FEXCore/Core/CPUID.h>
|
||||
#include <FEXCore/Utils/LogManager.h>
|
||||
#include <FEXCore/fextl/sstream.h>
|
||||
|
||||
#include <git_version.h>
|
||||
|
||||
@@ -21,7 +22,6 @@ $end_info$
|
||||
#include <fcntl.h>
|
||||
#include <filesystem>
|
||||
#include <ostream>
|
||||
#include <sstream>
|
||||
#include <stdio.h>
|
||||
#include <system_error>
|
||||
#include <unistd.h>
|
||||
@@ -49,8 +49,8 @@ namespace FEX::EmulatedFile {
|
||||
return fd;
|
||||
}
|
||||
|
||||
std::string GenerateCPUInfo(FEXCore::Context::Context *ctx, uint32_t CPUCores) {
|
||||
std::ostringstream cpu_stream{};
|
||||
fextl::string GenerateCPUInfo(FEXCore::Context::Context *ctx, uint32_t CPUCores) {
|
||||
fextl::ostringstream cpu_stream{};
|
||||
auto res_0 = ctx->RunCPUIDFunction(0, 0);
|
||||
auto res_1 = ctx->RunCPUIDFunction(1, 0);
|
||||
auto res_6 = ctx->RunCPUIDFunction(6, 0);
|
||||
@@ -106,7 +106,7 @@ namespace FEX::EmulatedFile {
|
||||
Info info {res_1};
|
||||
|
||||
uint32_t Family = info.FamilyID + (info.FamilyID == 0xF ? info.ExFamilyID : 0);
|
||||
std::ostringstream flags_data{};
|
||||
fextl::ostringstream flags_data{};
|
||||
// Generate the flags data up front
|
||||
// This is the same per core
|
||||
{
|
||||
|
||||
@@ -29,6 +29,7 @@ $end_info$
|
||||
#include <FEXCore/Utils/LogManager.h>
|
||||
#include <FEXCore/Utils/MathUtils.h>
|
||||
#include <FEXCore/Utils/Threads.h>
|
||||
#include <FEXCore/fextl/sstream.h>
|
||||
#include <FEXCore/fextl/string.h>
|
||||
#include <FEXCore/fextl/vector.h>
|
||||
#include <FEXHeaderUtils/Syscalls.h>
|
||||
@@ -181,7 +182,7 @@ static bool IsShebangFile(std::span<char> Data) {
|
||||
fextl::vector<fextl::string> ShebangArguments{};
|
||||
|
||||
// Shebang line can have a single argument
|
||||
std::istringstream InterpreterSS(InterpreterLine);
|
||||
fextl::istringstream InterpreterSS(InterpreterLine);
|
||||
fextl::string Argument;
|
||||
while (std::getline(InterpreterSS, Argument, ' ')) {
|
||||
if (Argument.empty()) {
|
||||
@@ -781,7 +782,7 @@ uint32_t SyscallHandler::CalculateHostKernelVersion() {
|
||||
int32_t Minor{};
|
||||
int32_t Patch{};
|
||||
char Tmp{};
|
||||
std::istringstream ss{buf.release};
|
||||
fextl::istringstream ss{buf.release};
|
||||
ss >> Major;
|
||||
ss.read(&Tmp, 1);
|
||||
ss >> Minor;
|
||||
|
||||
Reference in new issue
Block a user