Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
G
geany
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ç
Batuhan Osman TASKAYA
geany
Commits
4cfe71a4
Kaydet (Commit)
4cfe71a4
authored
Agu 01, 2014
tarafından
Colomban Wendling
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
Merge branch 'tm/faster-current-tag'
This makes tm_get_current_tag() roughly 4.5 times faster.
üst
257de659
f1ce9afa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
tm_workspace.c
tagmanager/src/tm_workspace.c
+5
-9
No files found.
tagmanager/src/tm_workspace.c
Dosyayı görüntüle @
4cfe71a4
...
...
@@ -745,27 +745,23 @@ tm_workspace_find_scoped (const char *name, const char *scope, gint type,
const
TMTag
*
tm_get_current_tag
(
GPtrArray
*
file_tags
,
const
gulong
line
,
const
guint
tag_types
)
{
GPtrArray
*
const
local
=
tm_tags_extract
(
file_tags
,
tag_types
);
TMTag
*
matching_tag
=
NULL
;
if
(
local
&&
local
->
len
)
if
(
file_tags
&&
file_tags
->
len
)
{
guint
i
;
gulong
matching_line
=
0
;
glong
delta
;
for
(
i
=
0
;
(
i
<
local
->
len
);
++
i
)
for
(
i
=
0
;
(
i
<
file_tags
->
len
);
++
i
)
{
TMTag
*
tag
=
TM_TAG
(
local
->
pdata
[
i
]);
delta
=
line
-
tag
->
atts
.
entry
.
line
;
if
(
delta
>=
0
&&
(
gulong
)
delta
<
line
-
matching_line
)
TMTag
*
tag
=
TM_TAG
(
file_tags
->
pdata
[
i
]);
if
(
tag
&&
tag
->
type
&
tag_types
&&
tag
->
atts
.
entry
.
line
<=
line
&&
tag
->
atts
.
entry
.
line
>
matching_line
)
{
matching_tag
=
tag
;
matching_line
=
tag
->
atts
.
entry
.
line
;
}
}
}
if
(
local
)
g_ptr_array_free
(
local
,
TRUE
);
return
matching_tag
;
}
...
...
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