]> www.ginac.de Git - ginac.git/blobdiff - ginac/ptr.h
ptr.h: use unsigned int to store reference counts (in order to save memory).
[ginac.git] / ginac / ptr.h
index c8b0691230bc5c8d8b8c49fc7f7d63620a2387c9..db7f95824864702962d5aa41723ecc8f8a7f01b1 100644 (file)
@@ -37,13 +37,13 @@ class refcounted {
 public:
        refcounted() throw() : refcount(0) {}
 
-       size_t add_reference() throw() { return ++refcount; }
-       size_t remove_reference() throw() { return --refcount; }
-       size_t get_refcount() const throw() { return refcount; }
-       void set_refcount(size_t r) throw() { refcount = r; }
+       unsigned int add_reference() throw() { return ++refcount; }
+       unsigned int remove_reference() throw() { return --refcount; }
+       unsigned int get_refcount() const throw() { return refcount; }
+       void set_refcount(unsigned int r) throw() { refcount = r; }
 
 private:
-       size_t refcount; ///< reference counter
+       unsigned int refcount; ///< reference counter
 };