Skip to content

Commit

Permalink
[#49635] src: gui_engine.cpp: Fix compilation warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Illia Vysochyn <[email protected]>
  • Loading branch information
ivysochyn authored and glatosinski committed Oct 20, 2023
1 parent 7d5b117 commit 768768b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/gui_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,13 @@ bool GuiEngine::checkValidationLayerSupport()
std::vector<VkLayerProperties> available_layers(layer_count);
vkEnumerateInstanceLayerProperties(&layer_count, available_layers.data());

for (const std::string &layer_name : validation_layers)
for (const char *layer_name : validation_layers)
{
bool layer_found = false;
const std::string layer_name_str(layer_name);
for (const VkLayerProperties &layer_properties : available_layers)
{
if (layer_name == layer_properties.layerName)
if (layer_name_str == layer_properties.layerName)
{
layer_found = true;
break;
Expand Down
4 changes: 2 additions & 2 deletions src/widget/widget_control.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,14 +473,14 @@ void ControlWidget::drawNumericValue(
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + draw_width / 2);
if (!from_val.empty())
{
ImGui::Text(from_val.c_str());
ImGui::Text("%s", from_val.c_str());
ImGui::SameLine();
}
draw_function();
if (!to_val.empty())
{
ImGui::SameLine();
ImGui::Text(to_val.c_str());
ImGui::Text("%s", to_val.c_str());
}
}

Expand Down

0 comments on commit 768768b

Please sign in to comment.