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 diff
     1.1 --- a/src/indyvon/async.clj	Sun Nov 30 18:45:12 2014 +0300
     1.2 +++ b/src/indyvon/async.clj	Mon Dec 01 21:39:22 2014 +0300
     1.3 @@ -48,15 +48,15 @@
     1.4                            Transparency/TRANSLUCENT))
     1.5  
     1.6  (defn- create-buffer [async-view device-conf]
     1.7 -  (Buffer. (Object.) (create-image async-view device-conf) 0 :free))
     1.8 +  (->Buffer (Object.) (create-image async-view device-conf) 0 :free))
     1.9  
    1.10  (defn- find-buffer
    1.11    "Find a buffer with the one of the specified states given
    1.12     in the order of preference."
    1.13    [buffers & states]
    1.14    (some identity
    1.15 -    (for [state states]
    1.16 -      (some #(if (= (:state %) state) % nil) buffers))))
    1.17 +        (for [state states]
    1.18 +          (some #(if (= (:state %) state) % nil) buffers))))
    1.19  
    1.20  (defn- replace-buffer [buffers buffer]
    1.21    (conj (remove #(= (:id %) (:id buffer)) buffers)
    1.22 @@ -90,8 +90,8 @@
    1.23                  (= :back state) :fresh
    1.24                  @fresh :free
    1.25                  :default :fresh)]
    1.26 -     (if (and (= state :fresh) @fresh)
    1.27 -       ;; Change state of the prefiously fresh buffer to :free.
    1.28 +     (when (and (= state :fresh) @fresh)
    1.29 +       ;; Change state of the previously fresh buffer to :free.
    1.30         (alter (:buffers al)
    1.31                replace-buffer (assoc @fresh
    1.32                                 :state :free)))