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
29c8aff5
Kaydet (Commit)
29c8aff5
authored
Eki 24, 2013
tarafından
Matúš Kukan
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
avoid temporary variables
Change-Id: I5eff10913c31d05e71105ed391a8bef4333ced4f
üst
7dd4555f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
15 deletions
+5
-15
segmenttree.cxx
sc/source/core/data/segmenttree.cxx
+5
-15
No files found.
sc/source/core/data/segmenttree.cxx
Dosyayı görüntüle @
29c8aff5
...
...
@@ -153,39 +153,29 @@ bool ScFlatSegmentsImpl<_ValueType, _ExtValueType>::getRangeData(SCCOLROW nPos,
if
(
!
mbTreeSearchEnabled
)
return
getRangeDataLeaf
(
nPos
,
rData
);
ValueType
nValue
;
SCCOLROW
nPos1
,
nPos2
;
if
(
!
maSegments
.
is_tree_valid
())
maSegments
.
build_tree
();
if
(
!
maSegments
.
search_tree
(
nPos
,
nValue
,
&
nPos1
,
&
nPos2
).
second
)
if
(
!
maSegments
.
search_tree
(
nPos
,
rData
.
mnValue
,
&
rData
.
mnPos1
,
&
rData
.
m
nPos2
).
second
)
return
false
;
rData
.
mnPos1
=
nPos1
;
rData
.
mnPos2
=
nPos2
-
1
;
// end point is not inclusive.
rData
.
mnValue
=
nValue
;
rData
.
mnPos2
=
rData
.
mnPos2
-
1
;
// end point is not inclusive.
return
true
;
}
template
<
typename
_ValueType
,
typename
_ExtValueType
>
bool
ScFlatSegmentsImpl
<
_ValueType
,
_ExtValueType
>::
getRangeDataLeaf
(
SCCOLROW
nPos
,
RangeData
&
rData
)
{
ValueType
nValue
;
SCCOLROW
nPos1
,
nPos2
;
// Conduct leaf-node only search. Faster when searching between range insertion.
::
std
::
pair
<
typename
fst_type
::
const_iterator
,
bool
>
ret
=
maSegments
.
search
(
maItr
,
nPos
,
nValue
,
&
nPos1
,
&
nPos2
);
const
::
std
::
pair
<
typename
fst_type
::
const_iterator
,
bool
>
&
ret
=
maSegments
.
search
(
maItr
,
nPos
,
rData
.
mnValue
,
&
rData
.
mnPos1
,
&
rData
.
m
nPos2
);
if
(
!
ret
.
second
)
return
false
;
maItr
=
ret
.
first
;
rData
.
mnPos1
=
nPos1
;
rData
.
mnPos2
=
nPos2
-
1
;
// end point is not inclusive.
rData
.
mnValue
=
nValue
;
rData
.
mnPos2
=
rData
.
mnPos2
-
1
;
// end point is not inclusive.
return
true
;
}
...
...
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