clover/util: Pass initial count value to ref_counter constructor.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 17 Aug 2014 20:26:49 +0000 (23:26 +0300)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 18 Aug 2014 06:32:24 +0000 (09:32 +0300)
And mark the ref_count() method as const.

Tested-by: EdB <edb+mesa@sigluy.net>
src/gallium/state_trackers/clover/util/pointer.hpp

index b790fd451c4968651b8311bb728e58f41361239a..aa119a4b82b655e466e47797b6e4f5ef65c2e5ab 100644 (file)
@@ -31,10 +31,10 @@ namespace clover {
    ///
    class ref_counter {
    public:
-      ref_counter() : _ref_count(1) {}
+      ref_counter(unsigned value = 1) : _ref_count(value) {}
 
       unsigned
-      ref_count() {
+      ref_count() const {
          return _ref_count;
       }