Skip to content

Commit 92a170a

Browse files
committed
gg: fix address of const warnings for v -experimental program_using_gg.v
1 parent f001561 commit 92a170a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vlib/gg/image.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ const missing_image = Image{}
5555
// See also: remove_cached_image_by_idx
5656
pub fn (mut ctx Context) get_cached_image_by_idx(image_idx int) &Image {
5757
if image_idx < 0 || image_idx > ctx.image_cache.len - 1 {
58-
return &missing_image
58+
return unsafe { &missing_image }
5959
}
6060
return &ctx.image_cache[image_idx]
6161
}
@@ -70,7 +70,7 @@ pub fn (mut ctx Context) remove_cached_image_by_idx(image_idx int) {
7070
return
7171
}
7272
ctx.image_cache[image_idx].destroy()
73-
ctx.image_cache[image_idx] = &missing_image
73+
ctx.image_cache[image_idx] = unsafe { &missing_image }
7474
}
7575

7676
// Draw part of an image using uv coordinates

0 commit comments

Comments
 (0)