mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
fix maps; use maps for storing functions; verify struct initialization
This commit is contained in:
@ -25,7 +25,7 @@ pub:
|
||||
// next *Entry
|
||||
}
|
||||
|
||||
pub fn new_map(cap, elm_size int) map {
|
||||
fn new_map(cap, elm_size int) map {
|
||||
res := map {
|
||||
// len: len,
|
||||
element_size: elm_size
|
||||
@ -59,15 +59,6 @@ fn (m mut map) _set(key string, val voidptr) {
|
||||
m.is_sorted = false
|
||||
}
|
||||
|
||||
fn volt_abs(n int) int {
|
||||
// println('volt_abs($n)')
|
||||
if n < 0 {
|
||||
// println('< 0: -($n)')
|
||||
return -n
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
fn (m map) bs(query string, start, end int, out voidptr) {
|
||||
// println('bs "$query" $start -> $end')
|
||||
mid := start + ((end - start) / 2)
|
||||
|
Reference in New Issue
Block a user