X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fptr.h;h=db7f95824864702962d5aa41723ecc8f8a7f01b1;hp=4c4ea71d6bbfde7d70a1f0e563f29d9ef3c1d164;hb=ce9053c15affb2a1a99d1157b85266d70aec601b;hpb=dffb4439ad438c76002d6b7798e5e3b651a2ac19;ds=sidebyside diff --git a/ginac/ptr.h b/ginac/ptr.h index 4c4ea71d..db7f9582 100644 --- a/ginac/ptr.h +++ b/ginac/ptr.h @@ -3,7 +3,7 @@ * Reference-counted pointer template. */ /* - * GiNaC Copyright (C) 1999-2004 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 @@ -17,7 +17,7 @@ * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __GINAC_PTR_H__ @@ -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 }; @@ -142,6 +142,7 @@ public: inline friend std::ostream & operator<<(std::ostream & os, const ptr & rhs) { os << rhs.p; + return os; } private: