1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

unsafe: tag with unsafe{} some more pointer manipulations

This commit is contained in:
Delyan Angelov
2020-07-22 21:42:51 +03:00
parent 949ed90b51
commit 276c1de190
9 changed files with 44 additions and 25 deletions

View File

@@ -381,12 +381,12 @@ fn (cb &Clipboard) pick_target(prop Property) C.Atom {
//See if this data type is allowed and of higher priority (closer to zero)
//than the present one.
if cb.is_supported_target(atom_list[i]) {
index := cb.get_target_index(atom_list[i])
if priority > index && index >= 0
{
target := unsafe{ atom_list[i] }
if cb.is_supported_target(target) {
index := cb.get_target_index(target)
if priority > index && index >= 0 {
priority = index
to_be_requested = atom_list[i]
to_be_requested = target
}
}
}