aboutsummaryrefslogtreecommitdiffhomepage
path: root/builtin_commandline.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-06 00:57:43 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-06 00:57:43 -0800
commita534c397f5df818cfb6d07a6c51dc6ba88dac986 (patch)
treefb0937f8e9864748e88d997457252a3a6ad25844 /builtin_commandline.cpp
parent737589ec01d3985674db0d85c3eb95ad636e54a0 (diff)
Const correctness changes
Diffstat (limited to 'builtin_commandline.cpp')
-rw-r--r--builtin_commandline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin_commandline.cpp b/builtin_commandline.cpp
index 0ead0994..f45c9f29 100644
--- a/builtin_commandline.cpp
+++ b/builtin_commandline.cpp
@@ -56,7 +56,7 @@ enum
Pointer to what the commandline builtin considers to be the current
contents of the command line buffer.
*/
-static wchar_t *current_buffer=0;
+static const wchar_t *current_buffer=0;
/**
What the commandline builtin considers to be the current cursor
position.
@@ -66,7 +66,7 @@ static int current_cursor_pos = -1;
/**
Returns the current commandline buffer.
*/
-static wchar_t *get_buffer()
+static const wchar_t *get_buffer()
{
return current_buffer;
}
@@ -230,7 +230,7 @@ static int builtin_commandline( parser_t &parser, wchar_t **argv )
int cursor_mode = 0;
int line_mode = 0;
int search_mode = 0;
- wchar_t *begin, *end;
+ const wchar_t *begin, *end;
current_buffer = (wchar_t *)builtin_complete_get_temporary_buffer();
if( current_buffer )
@@ -575,7 +575,7 @@ static int builtin_commandline( parser_t &parser, wchar_t **argv )
if( line_mode )
{
int pos = reader_get_cursor_pos();
- wchar_t *buff = reader_get_buffer();
+ const wchar_t *buff = reader_get_buffer();
sb_printf( sb_out, L"%d\n", parse_util_lineno( buff, pos ) );
return 0;