mirror of https://github.com/penpot/penpot.git
⚡ Add several missing type hints for avoid reflection and autoboxing
This commit is contained in:
parent
89b67d59d5
commit
17ec360720
|
|
@ -33,7 +33,7 @@
|
|||
(println "event:" (d/name name))
|
||||
(println "data:" (t/encode-str data {:type :json-verbose}))
|
||||
(println))]
|
||||
(.getBytes data "UTF-8"))
|
||||
(.getBytes ^String data "UTF-8"))
|
||||
(catch Throwable cause
|
||||
(l/err :hint "unexpected error on encoding value on sse stream"
|
||||
:cause cause)
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@
|
|||
(defn- parse-svg
|
||||
[text]
|
||||
(let [text (strip-doctype text)]
|
||||
(dm/with-open [istream (IOUtils/toInputStream text "UTF-8")]
|
||||
(dm/with-open [istream (IOUtils/toInputStream ^String text "UTF-8")]
|
||||
(xml/parse istream secure-parser-factory))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
|
|
@ -212,8 +212,8 @@
|
|||
deleted 0]
|
||||
(if-let [chunk (get-chunk pool)]
|
||||
(let [[nfo ndo] (db/tx-run! cfg process-chunk! chunk)]
|
||||
(recur (+ freezed nfo)
|
||||
(+ deleted ndo)))
|
||||
(recur (long (+ freezed nfo))
|
||||
(long (+ deleted ndo))))
|
||||
(do
|
||||
(l/inf :hint "task finished"
|
||||
:to-freeze freezed
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@
|
|||
(db/exec-one! conn ["SET LOCAL rules.deletion_protection TO off"])
|
||||
(proc-fn cfg)))]
|
||||
(if (pos? result)
|
||||
(recur (+ total result))
|
||||
(recur (long (+ total result)))
|
||||
total))))
|
||||
|
||||
(defmethod ig/assert-key ::handler
|
||||
|
|
@ -335,7 +335,7 @@
|
|||
(if-let [proc-fn (first procs)]
|
||||
(let [result (execute-proc! cfg proc-fn)]
|
||||
(recur (rest procs)
|
||||
(+ total result)))
|
||||
(long (+ total result))))
|
||||
(do
|
||||
(l/inf :hint "task finished" :deleted total)
|
||||
{:processed total}))))))
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@
|
|||
|
||||
[_ modif-tree]
|
||||
(reduce set-child-modifiers [layout-line modif-tree] children)]
|
||||
(recur modif-tree (first pending) (rest pending) to-idx))
|
||||
(recur modif-tree (first pending) (rest pending) (long to-idx)))
|
||||
|
||||
modif-tree)))))
|
||||
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@
|
|||
(rest children)))))]
|
||||
|
||||
(recur next-areas
|
||||
(+ from-idx (:num-children current-line))
|
||||
(+ from-idx (long (:num-children current-line)))
|
||||
(+ (:x line-area) (:width line-area))
|
||||
(+ (:y line-area) (:height line-area))
|
||||
(rest lines)))))))
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@
|
|||
min-fr
|
||||
(let [{:keys [size type value]} (first tracks)
|
||||
min-fr (if (= type :flex) (max min-fr (/ size value)) min-fr)]
|
||||
(recur (rest tracks) min-fr)))))
|
||||
(recur (rest tracks) (double min-fr))))))
|
||||
|
||||
(defn calc-layout-data
|
||||
([parent transformed-parent-bounds children bounds objects]
|
||||
|
|
|
|||
Loading…
Reference in New Issue