diff --git a/src/gui_engine.cpp b/src/gui_engine.cpp index fb0f2f9..0d02e66 100644 --- a/src/gui_engine.cpp +++ b/src/gui_engine.cpp @@ -39,12 +39,13 @@ bool GuiEngine::checkValidationLayerSupport() std::vector 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; diff --git a/src/widget/widget_control.cpp b/src/widget/widget_control.cpp index bf7fd9e..b222b6b 100644 --- a/src/widget/widget_control.cpp +++ b/src/widget/widget_control.cpp @@ -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()); } }