vstyle diff: performance improvement
This commit is contained in:
parent
a9b5216a42
commit
06f5283709
1 changed files with 3 additions and 1 deletions
|
|
@ -146,7 +146,9 @@ proc eq*(a, b: VNode): bool =
|
||||||
if a.attrs.len != b.attrs.len: return false
|
if a.attrs.len != b.attrs.len: return false
|
||||||
for i in 0..<a.attrs.len:
|
for i in 0..<a.attrs.len:
|
||||||
if a.attrs[i] != b.attrs[i]: return false
|
if a.attrs[i] != b.attrs[i]: return false
|
||||||
if a.style != b.style: return false
|
# Do not compare styles here. The idea is that nodes only
|
||||||
|
# differing in styling can be made equal easily enough:
|
||||||
|
#if a.style != b.style: return false
|
||||||
result = true
|
result = true
|
||||||
|
|
||||||
proc setAttr*(n: VNode; key: cstring; val: cstring = "") =
|
proc setAttr*(n: VNode; key: cstring; val: cstring = "") =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue