clover/util: Pass initial count value to ref_counter constructor.

And mark the ref_count() method as const.

Tested-by: EdB <edb+mesa@sigluy.net>
This commit is contained in:
Francisco Jerez 2014-08-17 23:26:49 +03:00
parent 37e4d22e95
commit c6817f19f6

View 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;
}