mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-25 12:12:50 +01:00
debugger: Fix trailing spaces in PPU register dump
This commit is contained in:
parent
3f44ecb77a
commit
d5eebd6ab4
@ -589,7 +589,7 @@ std::vector<std::string> fmt::split(std::string_view source, std::initializer_li
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string fmt::trim(const std::string& source, const std::string& values)
|
||||
std::string fmt::trim(const std::string& source, std::string_view values)
|
||||
{
|
||||
usz begin = source.find_first_not_of(values);
|
||||
|
||||
@ -599,6 +599,12 @@ std::string fmt::trim(const std::string& source, const std::string& values)
|
||||
return source.substr(begin, source.find_last_not_of(values) + 1);
|
||||
}
|
||||
|
||||
void fmt::trim_back(std::string& source, std::string_view values)
|
||||
{
|
||||
const usz index = source.find_last_not_of(values);
|
||||
source.resize(index + 1);
|
||||
}
|
||||
|
||||
std::string fmt::to_upper(std::string_view string)
|
||||
{
|
||||
std::string result;
|
||||
|
@ -124,7 +124,8 @@ namespace fmt
|
||||
}
|
||||
|
||||
std::vector<std::string> split(std::string_view source, std::initializer_list<std::string_view> separators, bool is_skip_empty = true);
|
||||
std::string trim(const std::string& source, const std::string& values = " \t");
|
||||
std::string trim(const std::string& source, std::string_view values = " \t");
|
||||
void trim_back(std::string& source, std::string_view values = " \t");
|
||||
|
||||
template <typename T>
|
||||
std::string merge(const T& source, const std::string& separator)
|
||||
|
@ -1153,7 +1153,8 @@ void ppu_thread::dump_regs(std::string& ret) const
|
||||
}
|
||||
}
|
||||
|
||||
fmt::append(ret, "\n");
|
||||
fmt::trim_back(ret);
|
||||
ret += '\n';
|
||||
}
|
||||
|
||||
for (uint i = 0; i < 32; ++i)
|
||||
|
Loading…
Reference in New Issue
Block a user