mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Silence a bunch of MSVC warnings
This commit is contained in:
parent
01e94ccdbb
commit
fe81590b07
3 changed files with 5 additions and 5 deletions
|
@ -428,7 +428,7 @@ public:
|
|||
VectorModel() = default;
|
||||
/// Constructs a new VectorModel from \a array.
|
||||
VectorModel(std::vector<ModelData> array) : data(std::move(array)) { }
|
||||
int row_count() const override { return data.size(); }
|
||||
int row_count() const override { return int(data.size()); }
|
||||
ModelData row_data(int i) const override { return data[i]; }
|
||||
void set_row_data(int i, const ModelData &value) override
|
||||
{
|
||||
|
@ -440,7 +440,7 @@ public:
|
|||
void push_back(const ModelData &value)
|
||||
{
|
||||
data.push_back(value);
|
||||
this->row_added(data.size() - 1, 1);
|
||||
this->row_added(int(data.size()) - 1, 1);
|
||||
}
|
||||
|
||||
/// Remove the row at the given index from the model
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
/// Returns the number of gradient stops.
|
||||
int stopCount() const { return inner.size() - 1; }
|
||||
int stopCount() const { return int(inner.size()) - 1; }
|
||||
|
||||
/// Returns a pointer to the first gradient stop; undefined if the gradient has not stops.
|
||||
const GradientStop *stopsBegin() const { return inner.begin() + 1; }
|
||||
|
|
|
@ -485,13 +485,13 @@ inline Value::Value(const std::shared_ptr<sixtyfps::Model<Value>> &model)
|
|||
return reinterpret_cast<ModelWrapper *>(self.instance)->model->row_count();
|
||||
};
|
||||
auto row_data = [](VRef<ModelAdaptorVTable> self, uintptr_t row, ValueOpaque *out) {
|
||||
Value v = reinterpret_cast<ModelWrapper *>(self.instance)->model->row_data(row);
|
||||
Value v = reinterpret_cast<ModelWrapper *>(self.instance)->model->row_data(int(row));
|
||||
*out = v.inner;
|
||||
cbindgen_private::sixtyfps_interpreter_value_new(&v.inner);
|
||||
};
|
||||
auto set_row_data = [](VRef<ModelAdaptorVTable> self, uintptr_t row, const ValueOpaque *value) {
|
||||
Value v = *reinterpret_cast<const Value *>(value);
|
||||
reinterpret_cast<ModelWrapper *>(self.instance)->model->set_row_data(row, v);
|
||||
reinterpret_cast<ModelWrapper *>(self.instance)->model->set_row_data(int(row), v);
|
||||
};
|
||||
auto get_notify =
|
||||
[](VRef<ModelAdaptorVTable> self) -> const cbindgen_private::ModelNotifyOpaque * {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue