Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
cb11bca5
Kaydet (Commit)
cb11bca5
authored
Ara 05, 2014
tarafından
Bjoern Michaelsen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add unique() function
Change-Id: I9866a2725bc74e3afd90eb5c32587beb7f4f6e2a
üst
bf449c26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
ring.hxx
sw/inc/ring.hxx
+3
-0
uwriter.cxx
sw/qa/core/uwriter.cxx
+8
-0
No files found.
sw/inc/ring.hxx
Dosyayı görüntüle @
cb11bca5
...
...
@@ -85,6 +85,9 @@ namespace sw
/** @return the previous item in the ring container */
const_value_type
*
GetPrevInRing
()
const
{
return
pPrev
;
}
/** @return true if and only if this item is alone in its ring */
bool
unique
()
const
{
return
algo
::
unique
(
static_cast
<
const_value_type
*
>
(
this
));
}
private
:
/** internal implementation class -- not for external use */
...
...
sw/qa/core/uwriter.cxx
Dosyayı görüntüle @
cb11bca5
...
...
@@ -1282,6 +1282,8 @@ namespace
{
return
GetNextInRing
();
}
TestRing
*
GetPrev
()
{
return
GetPrevInRing
();
}
bool
lonely
()
const
{
return
unique
();
}
#if 0
void debug()
{
...
...
@@ -1301,11 +1303,17 @@ void SwDocTest::testIntrusiveRing()
vRings
.
push_back
(
&
aRing4
);
vRings
.
push_back
(
&
aRing5
);
CPPUNIT_ASSERT_EQUAL
(
aRing1
.
GetRingContainer
().
size
(),
static_cast
<
size_t
>
(
1
));
CPPUNIT_ASSERT
(
aRing1
.
lonely
());
CPPUNIT_ASSERT
(
aRing2
.
lonely
());
CPPUNIT_ASSERT
(
aRing3
.
lonely
());
aRing2
.
MoveTo
(
&
aRing1
);
aRing3
.
MoveTo
(
&
aRing1
);
CPPUNIT_ASSERT_EQUAL
(
aRing1
.
GetRingContainer
().
size
(),
static_cast
<
size_t
>
(
3
));
CPPUNIT_ASSERT_EQUAL
(
aRing2
.
GetRingContainer
().
size
(),
static_cast
<
size_t
>
(
3
));
CPPUNIT_ASSERT_EQUAL
(
aRing3
.
GetRingContainer
().
size
(),
static_cast
<
size_t
>
(
3
));
CPPUNIT_ASSERT
(
!
aRing1
.
lonely
());
CPPUNIT_ASSERT
(
!
aRing2
.
lonely
());
CPPUNIT_ASSERT
(
!
aRing3
.
lonely
());
aRing5
.
MoveTo
(
&
aRing4
);
CPPUNIT_ASSERT_EQUAL
(
aRing4
.
GetRingContainer
().
size
(),
static_cast
<
size_t
>
(
2
));
aRing4
.
GetRingContainer
().
merge
(
aRing1
.
GetRingContainer
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment