Linux: Fixed build error
This commit is contained in:
parent
666e6f72f5
commit
4722d71126
2 changed files with 19 additions and 21 deletions
|
@ -33,6 +33,25 @@ TraceLogger::~TraceLogger()
|
|||
_instance = nullptr;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void TraceLogger::WriteValue(string &output, T value, RowPart& rowPart)
|
||||
{
|
||||
string str = rowPart.DisplayInHex ? HexUtilities::ToHex(value) : std::to_string(value);
|
||||
output += str;
|
||||
if(rowPart.MinWidth > str.size()) {
|
||||
output += std::string(rowPart.MinWidth - str.size(), ' ');
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
void TraceLogger::WriteValue(string &output, string value, RowPart& rowPart)
|
||||
{
|
||||
output += value;
|
||||
if(rowPart.MinWidth > value.size()) {
|
||||
output += std::string(rowPart.MinWidth - value.size(), ' ');
|
||||
}
|
||||
}
|
||||
|
||||
void TraceLogger::SetOptions(TraceLoggerOptions options)
|
||||
{
|
||||
_options = options;
|
||||
|
@ -155,7 +174,6 @@ void TraceLogger::GetStatusFlag(string &output, uint8_t ps, RowPart& part)
|
|||
} else {
|
||||
constexpr char activeStatusLetters[8] = { 'N', 'V', '-', '-', 'D', 'I', 'Z', 'C' };
|
||||
constexpr char inactiveStatusLetters[8] = { 'n', 'v', '-', '-', 'd', 'i', 'z', 'c' };
|
||||
int padding = 6;
|
||||
string flags;
|
||||
for(int i = 0; i < 8; i++) {
|
||||
if(ps & 0x80) {
|
||||
|
@ -169,25 +187,6 @@ void TraceLogger::GetStatusFlag(string &output, uint8_t ps, RowPart& part)
|
|||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void TraceLogger::WriteValue(string &output, T value, RowPart& rowPart)
|
||||
{
|
||||
string str = rowPart.DisplayInHex ? HexUtilities::ToHex(value) : std::to_string(value);
|
||||
output += str;
|
||||
if(rowPart.MinWidth > str.size()) {
|
||||
output += std::string(rowPart.MinWidth - str.size(), ' ');
|
||||
}
|
||||
}
|
||||
|
||||
template<>
|
||||
void TraceLogger::WriteValue(string &output, string value, RowPart& rowPart)
|
||||
{
|
||||
output += value;
|
||||
if(rowPart.MinWidth > value.size()) {
|
||||
output += std::string(rowPart.MinWidth - value.size(), ' ');
|
||||
}
|
||||
}
|
||||
|
||||
void TraceLogger::GetTraceRow(string &output, State &cpuState, PPUDebugState &ppuState, DisassemblyInfo &disassemblyInfo)
|
||||
{
|
||||
size_t originalSize = output.size();
|
||||
|
|
|
@ -94,7 +94,6 @@ private:
|
|||
void GetTraceRow(string &output, State &cpuState, PPUDebugState &ppuState, DisassemblyInfo &disassemblyInfo);
|
||||
|
||||
template<typename T> void WriteValue(string &output, T value, RowPart& rowPart);
|
||||
template<> void WriteValue(string &output, string value, RowPart& rowPart);
|
||||
|
||||
public:
|
||||
TraceLogger(Debugger* debugger, shared_ptr<MemoryManager> memoryManager, shared_ptr<LabelManager> labelManager);
|
||||
|
|
Loading…
Add table
Reference in a new issue