path: root/tools
diff options
authorNoel Grandin <>2018-01-25 12:59:53 +0200
committerNoel Grandin <>2018-01-27 17:19:26 +0100
commitc95d91ee35ca09379a8a1d415ae77716ddeadaac (patch)
tree370b0ad6832f3aca2ee0e2ef375bb6f953e5d360 /tools
parent2d8f17565ebe867210f5769851d91b2e7b612a8f (diff)
improve subtyping when dealing with tools::WeakReference
tweak the templating to make it easier to declare a WeakReference that points to a subclass for a weak-capable class. Which lets us declare some fields with more specific types, and dump a lot of unnecessary casting. And make WeakBase be inherited from virtually, so we don't end up with weird states where two weak refernces could point to two different parts of the same object. Change-Id: I3213ea27e087038457b0761b5171c7bce96e71f3 Reviewed-on: Tested-by: Jenkins <> Reviewed-by: Noel Grandin <>
Diffstat (limited to 'tools')
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/source/ref/ref.cxx b/tools/source/ref/ref.cxx
index 283776dd4cc3..dbb2122529e1 100644
--- a/tools/source/ref/ref.cxx
+++ b/tools/source/ref/ref.cxx
@@ -18,9 +18,16 @@
#include <tools/ref.hxx>
+#include <tools/weakbase.hxx>
+ if( )
+ mpWeakConnection->mpReference = nullptr;
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */