Make getSubFieldT return shared pointer

Signed-off-by: Dave Hickin <david.hickin@diamond.ac.uk>
This commit is contained in:
Dave Hickin committed 2015-07-13 12:48:05 +01:00
1 parent 9827caa3e3
commit ac2b6ea8db
5 files changed
+33 -30

No files matched your search

+4 -4
View File
@@ -541,16 +541,16 @@ static void testFieldAccess()
PVIntPtr a = fld->getSubField<PVInt>("test");
testOk1(a!=NULL);
if(a.get()) {
PVInt& b = fld->getSubFieldT<PVInt>("test");
testOk(&b==a.get(), "%p == %p", &b, a.get());
PVIntPtr b = fld->getSubFieldT<PVInt>("test");
testOk(b.get()==a.get(), "%p == %p", b.get(), a.get());
} else
testSkip(1, "test doesn't exist?");
a = fld->getSubField<PVInt>("hello.world");
testOk1(a!=NULL);
if(a.get()) {
PVInt& b = fld->getSubFieldT<PVInt>("hello.world");
testOk(&b==a.get(), "%p == %p", &b, a.get());
PVIntPtr b = fld->getSubFieldT<PVInt>("hello.world");
testOk(b.get()==a.get(), "%p == %p", b.get(), a.get());
} else
testSkip(1, "hello.world doesn't exist?");