diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-21 11:45:13 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-02-21 11:45:13 -0800 |
commit | 237cf19a7752602025c5eb131e47088882a59db4 (patch) | |
tree | 67d0ef3050f2de4be18551d3c5482d4a980db2ea /highlight.h | |
parent | 2206e221bd58b19141872c062012b6a9db0d73a2 (diff) |
Switch to using std::vector instead of int* for colors in highlight.cpp, for better range bounds checking
Diffstat (limited to 'highlight.h')
-rw-r--r-- | highlight.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/highlight.h b/highlight.h index 3b0eedbc..64697939 100644 --- a/highlight.h +++ b/highlight.h @@ -80,7 +80,7 @@ \param pos the cursor position. Used for quote matching, etc. \param error a list in which a description of each error will be inserted. May be 0, in whcich case no error descriptions will be generated. */ -void highlight_shell( const wchar_t *buff, int *color, int pos, wcstring_list_t *error, const env_vars &vars ); +void highlight_shell( const wchar_t *buff, std::vector<int> &color, int pos, wcstring_list_t *error, const env_vars &vars ); /** Perform syntax highlighting for the text in buff. Matching quotes and paranthesis are highlighted. The result is @@ -92,7 +92,7 @@ void highlight_shell( const wchar_t *buff, int *color, int pos, wcstring_list_t \param pos the cursor position. Used for quote matching, etc. \param error a list in which a description of each error will be inserted. May be 0, in whcich case no error descriptions will be generated. */ -void highlight_universal( const wchar_t *buff, int *color, int pos, wcstring_list_t *error, const env_vars &vars ); +void highlight_universal( const wchar_t *buff, std::vector<int> &color, int pos, wcstring_list_t *error, const env_vars &vars ); /** Translate from HIGHLIGHT_* to FISH_COLOR_* according to environment |