summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-01 19:01:26 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2014-12-02 00:37:02 +0100
commit66fc18538b544d62bc51f2fc485cf997433ff990 (patch)
treef206e350a15415be08efdce759a3a08854e809e2 /sw/qa
parentef5051b59270b324968cb91304fb25f622b80329 (diff)
use new typesafer implementation
Change-Id: I2228b2d421987c71e9738e32d138eccab02ea1db
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/core/uwriter.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index d8da67b941d6..36e8e9adf70c 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -1275,9 +1275,9 @@ void SwDocTest::testMarkMove()
namespace
{
- struct TestRing : public Ring
+ struct TestRing : public Ring<TestRing>
{
- TestRing() : Ring() {};
+ TestRing() : Ring<TestRing>() {};
void debug()
{
SAL_DEBUG("TestRing at: " << this << " prev: " << GetPrev() << " next: " << GetNext());
@@ -1312,12 +1312,12 @@ void SwDocTest::testIntrusiveRing()
std::vector<TestRing*>::iterator ppNext = ppRing+1;
if(ppNext==vRings.end())
ppNext = vRings.begin();
- CPPUNIT_ASSERT_EQUAL((*ppRing)->GetNext(), static_cast<Ring*>(*ppNext));
- CPPUNIT_ASSERT_EQUAL((*ppNext)->GetPrev(), static_cast<Ring*>(*ppRing));
+ CPPUNIT_ASSERT_EQUAL((*ppRing)->GetNext(), *ppNext);
+ CPPUNIT_ASSERT_EQUAL((*ppNext)->GetPrev(), *ppRing);
}
- BOOST_FOREACH(Ring& r, std::make_pair(aRing1.beginRing(), aRing1.endRing()))
+ BOOST_FOREACH(TestRing& r, std::make_pair(aRing1.beginRing(), aRing1.endRing()))
{
- TestRing* pRing = dynamic_cast<TestRing*>(&r);
+ TestRing* pRing = &r;
CPPUNIT_ASSERT(pRing);
//pRing->debug();
}