aboutsummaryrefslogtreecommitdiffhomepage
path: root/highlight.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-08 00:45:07 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-08 00:45:07 -0800
commit063fc0c48bd3c9c3bb2233f71c389281a66414a3 (patch)
tree8507b49dad7e7fbf60393360b9143a221767029d /highlight.cpp
parent191eeab58906e49a8863c60ac0324f722bdfa17c (diff)
Cleanup al_list from builtin_complete.cpp
Diffstat (limited to 'highlight.cpp')
-rw-r--r--highlight.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/highlight.cpp b/highlight.cpp
index af8b7c9f..1864a286 100644
--- a/highlight.cpp
+++ b/highlight.cpp
@@ -1043,9 +1043,7 @@ static void highlight_universal_internal( const wchar_t * buff,
*/
if( (buff[pos] == L'\'') || (buff[pos] == L'\"') )
{
-
- array_list_t l;
- al_init( &l );
+ std::deque<long> lst;
int level=0;
wchar_t prev_q=0;
@@ -1066,7 +1064,7 @@ static void highlight_universal_internal( const wchar_t * buff,
if( level == 0 )
{
level++;
- al_push_long( &l, (long)(str-buff) );
+ lst.push_back((long)(str-buff));
prev_q = *str;
}
else
@@ -1076,7 +1074,7 @@ static void highlight_universal_internal( const wchar_t * buff,
long pos1, pos2;
level--;
- pos1 = al_pop_long( &l );
+ pos1 = lst.back();
pos2 = str-buff;
if( pos1==pos || pos2==pos )
{
@@ -1090,7 +1088,7 @@ static void highlight_universal_internal( const wchar_t * buff,
else
{
level++;
- al_push_long( &l, (long)(str-buff) );
+ lst.push_back((long)(str-buff));
prev_q = *str;
}
}
@@ -1102,8 +1100,6 @@ static void highlight_universal_internal( const wchar_t * buff,
str++;
}
-
- al_destroy( &l );
if( !match_found )
color[pos] = HIGHLIGHT_ERROR<<16;