Fixed compiler warnings

This commit is contained in:
Sour 2018-06-07 21:58:22 -04:00
parent 7fb369bfc9
commit 88d84f7c0b
2 changed files with 5 additions and 5 deletions

View file

@ -38,7 +38,7 @@ 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()) {
if(rowPart.MinWidth > (int)str.size()) {
output += std::string(rowPart.MinWidth - str.size(), ' ');
}
}
@ -47,7 +47,7 @@ template<>
void TraceLogger::WriteValue(string &output, string value, RowPart& rowPart)
{
output += value;
if(rowPart.MinWidth > value.size()) {
if(rowPart.MinWidth > (int)value.size()) {
output += std::string(rowPart.MinWidth - value.size(), ' ');
}
}
@ -192,7 +192,7 @@ void TraceLogger::GetStatusFlag(string &output, uint8_t ps, RowPart& part)
void TraceLogger::GetTraceRow(string &output, State &cpuState, PPUDebugState &ppuState, DisassemblyInfo &disassemblyInfo)
{
size_t originalSize = output.size();
int originalSize = (int)output.size();
for(RowPart& rowPart : _rowParts) {
switch(rowPart.DataType) {
case RowDataType::Text: output += rowPart.Text; break;
@ -240,7 +240,7 @@ void TraceLogger::GetTraceRow(string &output, State &cpuState, PPUDebugState &pp
}
case RowDataType::Align:
if(output.size() - originalSize < rowPart.MinWidth) {
if((int)output.size() - originalSize < rowPart.MinWidth) {
output += std::string(rowPart.MinWidth - (output.size() - originalSize), ' ');
}
break;

View file

@ -578,7 +578,7 @@ namespace NES
if(utf8Message.size() > 0) {
std::wstring message = utf8::utf8::decode(utf8Message);
float width = MeasureString(message);
DrawString(message, _screenWidth - width - 20, _screenHeight - 40, Colors::AntiqueWhite, 1.0f, _font.get());
DrawString(message, (float)_screenWidth - width - 20, (float)_screenHeight - 40, Colors::AntiqueWhite, 1.0f, _font.get());
}
}
}