Commit Graph

8 Commits

Author SHA1 Message Date
czeidler b5c5640ec0 Style fixes. Thanks Axel and Ingo. 2012-01-06 09:35:33 +13:00
czeidler 32951c4e63 Make BReference and BWeakReference behave more like a normal pointer.
* Casts like BReference<Derived> to BReference<Base> are now possible.
* This cast for BWeakReference is, because of the underlying structure, not automatically type safe. I used a simple hack to make the compiler complain if the cast
is not type safe. Please take a look if that can be done better.
* Smaller style and bug fixes.
2012-01-05 13:42:45 +13:00
Clemens Zeidler ac80530495 Use nothrow and add InitCheck method to check if allocation went fine.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42765 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-23 02:03:10 +00:00
Clemens Zeidler cf53ed6f64 New BWeakReferenceable API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42763 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-09-22 22:43:16 +00:00
Ingo Weinhold 756b64fd83 * Removed the obsolescent [B]Reference[able] API and replaced the remaining
uses. Fixes the gcc 2 acpi build.
* Renamed WeakReferenceable::{Add,Remove}Reference() to
  {Acquire,Release}Reference() for consistency.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 16:35:42 +00:00
Axel Dörfler 8eb51285d3 * Made _GetUnchecked() return nothing, as it was ignored anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30359 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-24 09:58:54 +00:00
Axel Dörfler 28a650e94d * Made the WeakReferenceable class templatized. Not really sure yet I like that
better, though :-)
* Also fixed a mixup of the unintuitive argument order of our
  atomic_test_and_set(); I guess I will change that sooner or later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 15:14:15 +00:00
Axel Dörfler e1fed132d2 * Added a WeakReferenceable implementation, completely untested yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-04-07 12:01:30 +00:00