mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 14:21:16 +00:00
More MSVC warnings fixes
This commit is contained in:
parent
c25d41526a
commit
63cf84d21f
3 changed files with 4 additions and 4 deletions
|
@ -350,7 +350,7 @@ SCENARIO("Invoke callback")
|
|||
auto instance = result->create();
|
||||
REQUIRE(instance->set_callback("foo", [](auto args) {
|
||||
SharedString arg1 = *args[0].to_string();
|
||||
int arg2 = *args[1].to_number();
|
||||
double arg2 = *args[1].to_number();
|
||||
std::string res = std::string(arg1) + ":" + std::to_string(arg2);
|
||||
return Value(SharedString(res));
|
||||
}));
|
||||
|
|
|
@ -69,12 +69,12 @@ void DashboardBuilder::add_top_bar_widget(WidgetPtr widget)
|
|||
top_bar_widgets.push_back(widget_id);
|
||||
}
|
||||
|
||||
std::size_t DashboardBuilder::register_widget(WidgetPtr widget)
|
||||
int DashboardBuilder::register_widget(WidgetPtr widget)
|
||||
{
|
||||
auto widget_type_name = widget->type_name();
|
||||
widgets_used.insert(widget_type_name);
|
||||
|
||||
auto widget_id = widgets.size();
|
||||
auto widget_id = int(widgets.size());
|
||||
auto widget_name = fmt::format("widget_{}", widget_id);
|
||||
widgets.push_back({ widget_name, widget });
|
||||
return widget_id;
|
||||
|
|
|
@ -99,7 +99,7 @@ struct DashboardBuilder
|
|||
build(sixtyfps::interpreter::ComponentCompiler &compiler) const;
|
||||
|
||||
private:
|
||||
std::size_t register_widget(WidgetPtr widget);
|
||||
int register_widget(WidgetPtr widget);
|
||||
|
||||
std::unordered_set<std::string> widgets_used = { "TopBar", "MenuBar" };
|
||||
std::vector<int> top_bar_widgets;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue