* Reference-counted pointer template. */
/*
- * GiNaC Copyright (C) 1999-2007 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2008 Johannes Gutenberg University Mainz, Germany
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
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
};