Skip to content

Commit bf7609f

Browse files
authored
Merge pull request #34 from tonsky/master
Fixed boxed math warning, compatible with Clojure 1.10
2 parents b1e5b5a + 37fcee4 commit bf7609f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/editscript/diff/a_star.cljc

+3-5
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434
(get-next [this] "Get the next sibling node")
3535
(set-next [this node] "Set the next sibling node")
3636
(set-order [this o] "Set the traversal order of this node")
37-
#?(:clj (get-order ^long [this] "Get the order of this node in traversal")
38-
:cljs (^number get-order [this] "Get the order of this node in traversal"))
39-
#?(:clj (get-size ^long [this] "Get the size of sub-tree, used to estimate cost")
40-
:cljs (^number get-size [this] "Get the size of sub-tree, used to estimate cost"))
37+
(get-order [this] "Get the order of this node in traversal")
38+
(get-size [this] "Get the size of sub-tree, used to estimate cost")
4139
(set-size [this s] "Set the size of sub-tree"))
4240

4341
(deftype Node [^PersistentVector path
@@ -120,7 +118,7 @@
120118
:set (set-children order path data node)
121119
:lst (list-children order path data node))
122120
(let [^long cs (->> (get-children node) vals (map get-size) (reduce +))
123-
size (+ (get-size node) cs)]
121+
size (+ (long (get-size node)) cs)]
124122
(doto node
125123
(set-order @order)
126124
(set-size size))

0 commit comments

Comments
 (0)