Fix some fmt strings.

This commit is contained in:
David Given
2025-09-17 14:28:41 +02:00
parent b81e609e66
commit b22df17bb5
5 changed files with 9 additions and 10 deletions

View File

@@ -122,7 +122,7 @@ void AbstractSectorView::drawContent()
textSize.x / 2,
ImGui::GetCursorPosY() + rowHeight / 2 -
textSize.y / 2});
ImGui::Text("{}", text.c_str());
ImGui::Text("%s", text.c_str());
}
for (unsigned sectorId = minSector; sectorId <= maxSector;
@@ -172,7 +172,7 @@ void AbstractSectorView::drawContent()
{
ImGui::PopFont();
};
ImGui::SetItemTooltip(
ImGui::SetItemTooltip("%s",
fmt::format("Physical: c{}h{}s{}\n"
"Logical: c{}h{}s{}\n"
"Size: {} bytes\n"

View File

@@ -129,8 +129,7 @@ cxxlibrary(
cxxlibrary(
name="libpl",
srcs=sources_from("dep/pattern-language/lib/source")
+ sources_from("dep/pattern-language/cli/source"),
srcs=sources_from("dep/pattern-language/lib/source"),
hdrs=(
headers_from("dep/pattern-language/lib/include")
| headers_from("dep/pattern-language/generators/include")

View File

@@ -44,7 +44,7 @@ static void emitOptions(DynamicSetting<std::string>& setting,
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::TextWrapped("{}", wolv::util::capitalizeString(it.comment()));
ImGui::TextWrapped("%s", wolv::util::capitalizeString(it.comment()).c_str());
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(-FLT_MIN);
@@ -117,7 +117,7 @@ static void emitOptions(DynamicSetting<std::string>& setting,
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::TextWrapped("{}", comment);
ImGui::TextWrapped("%s", comment.c_str());
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(-FLT_MIN);

View File

@@ -13,7 +13,7 @@ namespace ImGui
{
static inline void Text(std::string text)
{
ImGui::Text("{}", text.c_str());
ImGui::Text("%s", text.c_str());
}
}

View File

@@ -193,7 +193,7 @@ void SummaryView::drawContent()
{
ImGui::PopFont();
};
ImGui::SetItemTooltip(tooltip.c_str());
ImGui::SetItemTooltip("%s", tooltip.c_str());
}
}
}
@@ -299,7 +299,7 @@ void SummaryView::drawContent()
{
ImGui::PopFont();
};
ImGui::SetItemTooltip(tooltip.c_str());
ImGui::SetItemTooltip("%s", tooltip.c_str());
}
}
}