aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/RefCount.hh
AgeCommit message (Collapse)AuthorFilesLines
2011-09-14Add comparison operators to FbTk::RefCountPavel Labath1-0/+30
without them, gcc would compare them by converting them to bool first, which is not exactly what one would expect. Frankly, I'm surprised it even worked without this.
2011-09-14Remove the assignment operator from a regular pointer to a RefCountPavel Labath1-4/+2
it is too easy too shoot yourself in the foot with it, other smart pointers also don't allow such assignments. If you do want to assign to a RefCount pointer, use reset(). ps: assignment between two RefCounts remains possible, of course.
2011-09-14add FbTk::makeRef function, for easier construction of RefCount pointersPavel Labath1-0/+20
2011-09-14Add a reset() function to FbTk::RefCountPavel Labath1-0/+1
to make it's interface more compatible with other smart pointers.
2011-09-14Add template copy constructor to FbTk::RefcountPavel Labath1-2/+8
and remove a an "almost" copy constructor (almost, because it takes a non-const reference parameter) which was useless.
2011-05-10Make RefCount<> more sensiblePavel Labath1-2/+6
the previous version of operator*() made no sense. E.g., it violated the invariant (*ptr).foo <=> ptr->foo. The dereferencing operator now returns a reference to the pointed-to object, rather than a pointer to it. I also added a bool conversion operator, which can be used in testing the NULL-ness of the pointer. Anyone wondering if that could be done in a simpler way is encouraged to read <http://www.artima.com/cppsource/safebool.html>. And, finally, I removed the mutable flag from the m_data member, since it does not need it.
2008-08-16some cleanupMark Tiefenbruck1-4/+1
2007-01-07I overkilled RefCount. Too tired. Heres the proper fix.simonb1-39/+18
2007-01-07fix intrinsic problem with refcountsimonb1-18/+39
adjust slit menus to deconstruct properly
2006-07-01more dead functionsmarkt1-0/+2
2005-01-24copyright datemathias1-1/+1
2003-12-16fixed some icc warningsfluxgen1-1/+1
2003-05-07forgot returnfluxgen1-0/+1
2003-01-11removed explicit from copy constructorfluxgen1-1/+1
2003-01-01fixed minor bug in operator = Pointerfluxgen1-3/+2
2002-12-13ref counting for pointersfluxgen1-0/+129