mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: disallow comparison between enum and int (#7886)
This commit is contained in:
@@ -797,7 +797,7 @@ fn (mut app App) next_theme() {
|
||||
|
||||
[inline]
|
||||
fn (mut app App) next_tile_format() {
|
||||
app.tile_format = int(app.tile_format) + 1
|
||||
app.tile_format = TileFormat(int(app.tile_format) + 1)
|
||||
if app.tile_format == .end_ {
|
||||
app.tile_format = .normal
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ mut:
|
||||
|
||||
fn main() {
|
||||
mut color_action := C.sg_color_attachment_action{
|
||||
action: C.SG_ACTION_CLEAR
|
||||
action: gfx.Action(C.SG_ACTION_CLEAR)
|
||||
}
|
||||
color_action.val[0] = 0.3
|
||||
color_action.val[1] = 0.3
|
||||
|
||||
@@ -64,7 +64,7 @@ mut:
|
||||
|
||||
fn main() {
|
||||
mut color_action := C.sg_color_attachment_action{
|
||||
action: C.SG_ACTION_CLEAR
|
||||
action: gfx.Action(C.SG_ACTION_CLEAR)
|
||||
}
|
||||
color_action.val[0] = 1
|
||||
color_action.val[1] = 1
|
||||
|
||||
@@ -82,8 +82,8 @@ fn init(user_data voidptr) {
|
||||
mut pipdesc := C.sg_pipeline_desc{}
|
||||
unsafe {C.memset(&pipdesc, 0, sizeof(pipdesc))}
|
||||
pipdesc.blend.enabled = true
|
||||
pipdesc.blend.src_factor_rgb = C.SG_BLENDFACTOR_SRC_ALPHA
|
||||
pipdesc.blend.dst_factor_rgb = C.SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
|
||||
pipdesc.blend.src_factor_rgb = gfx.BlendFactor(C.SG_BLENDFACTOR_SRC_ALPHA)
|
||||
pipdesc.blend.dst_factor_rgb = gfx.BlendFactor(C.SG_BLENDFACTOR_ONE_MINUS_SRC_ALPHA)
|
||||
app.alpha_pip = sgl.make_pipeline(&pipdesc)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user