Mercurial > hg > indyvon
changeset 169:8471a45645ad
Minor coding style corrections.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Mon, 01 Dec 2014 21:39:22 +0300 |
parents | 5b80af180da0 |
children | 0be55d38fe53 |
files | src/indyvon/async.clj |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/indyvon/async.clj Sun Nov 30 18:45:12 2014 +0300 +++ b/src/indyvon/async.clj Mon Dec 01 21:39:22 2014 +0300 @@ -48,15 +48,15 @@ Transparency/TRANSLUCENT)) (defn- create-buffer [async-view device-conf] - (Buffer. (Object.) (create-image async-view device-conf) 0 :free)) + (->Buffer (Object.) (create-image async-view device-conf) 0 :free)) (defn- find-buffer "Find a buffer with the one of the specified states given in the order of preference." [buffers & states] (some identity - (for [state states] - (some #(if (= (:state %) state) % nil) buffers)))) + (for [state states] + (some #(if (= (:state %) state) % nil) buffers)))) (defn- replace-buffer [buffers buffer] (conj (remove #(= (:id %) (:id buffer)) buffers) @@ -90,8 +90,8 @@ (= :back state) :fresh @fresh :free :default :fresh)] - (if (and (= state :fresh) @fresh) - ;; Change state of the prefiously fresh buffer to :free. + (when (and (= state :fresh) @fresh) + ;; Change state of the previously fresh buffer to :free. (alter (:buffers al) replace-buffer (assoc @fresh :state :free)))