mirror of
https://github.com/vlang/v.git
synced 2025-09-13 22:42:26 +03:00
examples, v.builder: fix v -cstrict -cc gcc-11 examples/sokol/particles
and the same but with clang-18 too
This commit is contained in:
parent
cac026aec1
commit
86740bb0a7
3 changed files with 8 additions and 6 deletions
|
@ -41,8 +41,8 @@ pub fn (mut s System) update(dt f64) {
|
||||||
moved++
|
moved++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$if trace_moves_spool_to_sbin ? {
|
|
||||||
if moved != 0 {
|
if moved != 0 {
|
||||||
|
$if trace_moves_spool_to_sbin ? {
|
||||||
eprintln('${moved:4} particles s.pool -> s.bin')
|
eprintln('${moved:4} particles s.pool -> s.bin')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ pub fn (mut s System) explode(x f32, y f32) {
|
||||||
moved++
|
moved++
|
||||||
reserve--
|
reserve--
|
||||||
}
|
}
|
||||||
$if trace_moves_sbin_to_spool ? {
|
|
||||||
if moved != 0 {
|
if moved != 0 {
|
||||||
|
$if trace_moves_sbin_to_spool ? {
|
||||||
eprintln('${moved:4} particles s.bin -> s.pool')
|
eprintln('${moved:4} particles s.bin -> s.pool')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,8 +56,8 @@ fn (mut a App) run() {
|
||||||
init_userdata_cb: init
|
init_userdata_cb: init
|
||||||
frame_userdata_cb: frame
|
frame_userdata_cb: frame
|
||||||
event_userdata_cb: event
|
event_userdata_cb: event
|
||||||
window_title: title.str
|
window_title: &char(title.str)
|
||||||
html5_canvas_name: title.str
|
html5_canvas_name: &char(title.str)
|
||||||
cleanup_userdata_cb: cleanup
|
cleanup_userdata_cb: cleanup
|
||||||
}
|
}
|
||||||
sapp.run(&desc)
|
sapp.run(&desc)
|
||||||
|
|
|
@ -159,6 +159,8 @@ fn (mut v Builder) setup_ccompiler_options(ccompiler string) {
|
||||||
'-Wno-int-to-pointer-cast', // gcc version of the above
|
'-Wno-int-to-pointer-cast', // gcc version of the above
|
||||||
'-Wno-trigraphs', // see stackoverflow.com/a/8435413
|
'-Wno-trigraphs', // see stackoverflow.com/a/8435413
|
||||||
'-Wno-missing-braces', // see stackoverflow.com/q/13746033
|
'-Wno-missing-braces', // see stackoverflow.com/q/13746033
|
||||||
|
'-Wno-enum-conversion', // silences `.dst_factor_rgb = sokol__gfx__BlendFactor__one_minus_src_alpha`
|
||||||
|
'-Wno-enum-compare', // silences `if (ev->mouse_button == sokol__sapp__MouseButton__left) {`
|
||||||
// enable additional warnings:
|
// enable additional warnings:
|
||||||
'-Wno-unknown-warning', // if a C compiler does not understand a certain flag, it should just ignore it
|
'-Wno-unknown-warning', // if a C compiler does not understand a certain flag, it should just ignore it
|
||||||
'-Wno-unknown-warning-option', // clang equivalent of the above
|
'-Wno-unknown-warning-option', // clang equivalent of the above
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue