Skip to content

Commit d06a4f4

Browse files
committed
clean up js/parseInt invokes
1 parent d2fdb5c commit d06a4f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/cljs/cljs/pprint.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1418,7 +1418,7 @@ http://www.lispworks.com/documentation/HyperSpec/Body/22_c.htm"
14181418
e (if (and (pos? (count e)) (= (nth e 0) \+)) (subs e 1) e)]
14191419
(if (empty? m2)
14201420
["0" 0]
1421-
[m2 (- (js/parseInt e) delta)])))
1421+
[m2 (- (js/parseInt e 10) delta)])))
14221422

14231423
(defn- inc-s
14241424
"Assumption: The input string consists of one or more decimal digits,
@@ -2475,7 +2475,7 @@ not a pretty writer (which keeps track of columns), this function always outputs
24752475
(and (= (.-length p) 1) (contains? #{\v \V} (nth p 0))) :parameter-from-args
24762476
(and (= (.-length p) 1) (= \# (nth p 0))) :remaining-arg-count
24772477
(and (= (.-length p) 2) (= \' (nth p 0))) (nth p 1)
2478-
true (js/parseInt p))
2478+
true (js/parseInt p 10))
24792479
offset])
24802480

24812481
(def ^{:private true}

src/main/cljs/cljs/test.cljs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@
366366
(defn js-line-and-column [stack-element]
367367
(let [parts (.split stack-element ":")
368368
cnt (count parts)]
369-
[(js/parseInt (nth parts (- cnt 2)))
370-
(js/parseInt (nth parts (dec cnt)))]))
369+
[(js/parseInt (nth parts (- cnt 2)) 10)
370+
(js/parseInt (nth parts (dec cnt)) 10)]))
371371

372372
(defn js-filename [stack-element]
373373
(first (.split (last (.split stack-element "/out/")) ":")))

0 commit comments

Comments
 (0)