use builtin hash functions instead of rolling my own
This commit is contained in:
parent
bb1745a05d
commit
9a785e0f06
5 changed files with 5 additions and 21 deletions
|
|
@ -9,7 +9,7 @@ import std::io;
|
|||
*/
|
||||
fn ElemEvents! Ctx.slider_hor(&ctx, String label, Rect size)
|
||||
{
|
||||
Id id = hash(label);
|
||||
Id id = label.hash();
|
||||
|
||||
Elem *parent = ctx.get_parent()!;
|
||||
Elem *c_elem = ctx.get_elem(id)!;
|
||||
|
|
@ -81,7 +81,7 @@ fn ElemEvents! Ctx.slider_hor(&ctx, String label, Rect size)
|
|||
*/
|
||||
fn ElemEvents! Ctx.slider_ver(&ctx, String label, Rect size)
|
||||
{
|
||||
Id id = hash(label);
|
||||
Id id = label.hash();
|
||||
|
||||
Elem *parent = ctx.get_parent()!;
|
||||
Elem *c_elem = ctx.get_elem(id)!;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue