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
b5bd7e60
Kaydet (Commit)
b5bd7e60
authored
Agu 23, 2014
tarafından
Matteo Casalin
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Reserve vector capacity in advance + minor optimizations
Change-Id: I04eea6825c02ea0c076b525e58a1dc86dd290b64
üst
0bb1d92c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
atrftn.cxx
sw/source/core/txtnode/atrftn.cxx
+7
-2
No files found.
sw/source/core/txtnode/atrftn.cxx
Dosyayı görüntüle @
b5bd7e60
...
@@ -90,6 +90,10 @@ namespace {
...
@@ -90,6 +90,10 @@ namespace {
const
std
::
set
<
sal_uInt16
>
&
rUsedNums
,
const
std
::
set
<
sal_uInt16
>
&
rUsedNums
,
size_t
numRequired
)
size_t
numRequired
)
{
{
if
(
!
numRequired
)
return
;
rLowestUnusedNums
.
reserve
(
numRequired
);
sal_uInt16
newNum
=
0
;
sal_uInt16
newNum
=
0
;
std
::
set
<
sal_uInt16
>::
iterator
it
;
std
::
set
<
sal_uInt16
>::
iterator
it
;
//Start by using numbers from gaps in rUsedNums
//Start by using numbers from gaps in rUsedNums
...
@@ -98,16 +102,17 @@ namespace {
...
@@ -98,16 +102,17 @@ namespace {
while
(
newNum
<
*
it
)
while
(
newNum
<
*
it
)
{
{
rLowestUnusedNums
.
push_back
(
newNum
++
);
rLowestUnusedNums
.
push_back
(
newNum
++
);
if
(
rLowestUnusedNums
.
size
()
>=
numRequired
)
if
(
--
numRequired
==
0
)
return
;
return
;
}
}
newNum
++
;
newNum
++
;
}
}
//Filled in all gaps. Fill the rest of the list with new numbers.
//Filled in all gaps. Fill the rest of the list with new numbers.
while
(
rLowestUnusedNums
.
size
()
<
numRequired
)
do
{
{
rLowestUnusedNums
.
push_back
(
newNum
++
);
rLowestUnusedNums
.
push_back
(
newNum
++
);
}
}
while
(
--
numRequired
>
0
);
}
}
}
}
...
...
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