mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: allow EnumName(number) casts only inside unsafe{} blocks (#15932)
This commit is contained in:
@@ -2,7 +2,7 @@ module gfx
|
||||
|
||||
pub fn create_clear_pass(r f32, g f32, b f32, a f32) PassAction {
|
||||
mut color_action := ColorAttachmentAction{
|
||||
action: Action(C.SG_ACTION_CLEAR)
|
||||
action: unsafe { Action(C.SG_ACTION_CLEAR) }
|
||||
value: Color{
|
||||
r: r
|
||||
g: g
|
||||
|
||||
@@ -20,12 +20,12 @@ pub fn shutdown() {
|
||||
|
||||
[inline]
|
||||
pub fn error() SglError {
|
||||
return SglError(int(C.sgl_error()))
|
||||
return unsafe { SglError(int(C.sgl_error())) }
|
||||
}
|
||||
|
||||
[inline]
|
||||
pub fn context_error(ctx Context) SglError {
|
||||
return SglError(int(C.sgl_context_error(ctx)))
|
||||
return unsafe { SglError(int(C.sgl_context_error(ctx))) }
|
||||
}
|
||||
|
||||
[inline]
|
||||
|
||||
Reference in New Issue
Block a user