Fix Compiler Error in Clang

```
error: type 'float' cannot be narrowed to 'int' in initializer list [-Wc++11-narrowing]
```
This commit is contained in:
Germano Cavalcante 2023-08-02 16:26:28 -03:00
parent 8662575f40
commit 72d7e3e684
2 changed files with 4 additions and 4 deletions

View File

@ -206,8 +206,8 @@ static void flushTransNodes(TransInfo *t)
else {
/* Edge panning functions expect window coordinates, mval is relative to region */
const int xy[2] = {
t->region->winrct.xmin + t->mval[0],
t->region->winrct.ymin + t->mval[1],
t->region->winrct.xmin + int(t->mval[0]),
t->region->winrct.ymin + int(t->mval[1]),
};
UI_view2d_edge_pan_apply(t->context, &customdata->edgepan_data, xy);
}

View File

@ -558,8 +558,8 @@ static void view2d_edge_pan_loc_compensate(TransInfo *t, float loc_in[2], float
else {
/* Edge panning functions expect window coordinates, mval is relative to region */
const int xy[2] = {
t->region->winrct.xmin + t->mval[0],
t->region->winrct.ymin + t->mval[1],
t->region->winrct.xmin + int(t->mval[0]),
t->region->winrct.ymin + int(t->mval[1]),
};
UI_view2d_edge_pan_apply(t->context, &ts->edge_pan, xy);
}