fix: Many format string warnings on MacOS and some Linux distros

This commit is contained in:
WerWolv
2021-12-31 01:10:06 +01:00
parent d3d9209b39
commit 077bc45b7d
25 changed files with 108 additions and 109 deletions

View File

@@ -114,7 +114,7 @@ namespace hex::plugin::builtin {
auto startY = ImGui::GetCursorPosY();
ImGui::TextUnformatted(hex::format(this->m_upperCaseHex ? "{:0{}X}:" : "{:0{}x}:", row * this->m_columnCount, addressDigitCount).c_str());
ImGui::TextFormatted(this->m_upperCaseHex ? "{:0{}X}:" : "{:0{}x}:", row * this->m_columnCount, addressDigitCount);
ImGui::SetCursorPosY(startY);
ImGui::TableNextColumn();
@@ -200,7 +200,7 @@ namespace hex::plugin::builtin {
auto glyphWidth = ImGui::CalcTextSize("0").x + 1;
for (u8 i = 0; i < 2; i++) {
for (u8 col = 0; col < this->m_columnCount; col++) {
ImGui::TextUnformatted(hex::format(this->m_upperCaseHex ? "{:02X}" : "{:02x}", col).c_str());
ImGui::TextFormatted(this->m_upperCaseHex ? "{:02X}" : "{:02x}", col);
ImGui::SameLine(0.0F, col % 8 == 7 ? glyphWidth * 1.5F : glyphWidth * 0.75F);
}
ImGui::TableNextColumn();