summaryrefslogtreecommitdiffstats
path: root/lldb/source/Host/common/Editline.cpp
diff options
context:
space:
mode:
authorVince Harron <vince@nethacker.com>2015-05-13 00:25:54 +0000
committerVince Harron <vince@nethacker.com>2015-05-13 00:25:54 +0000
commitd7e6a4f2f07464acfe4fe98b4e4038c67c7b2975 (patch)
tree329d2a720739a7140401e3842b751aa7f0651c93 /lldb/source/Host/common/Editline.cpp
parent9bbc3653c5ccb170167b2ab3c4ec098be83a3d04 (diff)
downloadbcm5719-llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.tar.gz
bcm5719-llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.zip
Fixed a ton of gcc compile warnings
Removed some unused variables, added some consts, changed some casts to const_cast. I don't think any of these changes are very controversial. Differential Revision: http://reviews.llvm.org/D9674 llvm-svn: 237218
Diffstat (limited to 'lldb/source/Host/common/Editline.cpp')
-rw-r--r--lldb/source/Host/common/Editline.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Host/common/Editline.cpp b/lldb/source/Host/common/Editline.cpp
index dd2e2dbf5fc..3d0d4d3dfb8 100644
--- a/lldb/source/Host/common/Editline.cpp
+++ b/lldb/source/Host/common/Editline.cpp
@@ -711,7 +711,7 @@ Editline::BreakLineCommand (int ch)
unsigned char
Editline::DeleteNextCharCommand (int ch)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
// Just delete the next character normally if possible
if (info->cursor < info->lastchar)
@@ -755,7 +755,7 @@ Editline::DeleteNextCharCommand (int ch)
unsigned char
Editline::DeletePreviousCharCommand (int ch)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
// Just delete the previous character normally when not at the start of a line
if (info->cursor > info->buffer)
@@ -861,7 +861,7 @@ Editline::FixIndentationCommand (int ch)
StringList lines = GetInputAsStringList (m_current_line_index + 1);
// Determine the cursor position
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
int cursor_position = info->cursor - info->buffer;
int indent_correction = m_fix_indentation_callback (this, lines, cursor_position, m_fix_indentation_callback_baton);
@@ -887,7 +887,7 @@ Editline::RevertLineCommand (int ch)
el_winsertstr (m_editline, m_input_lines[m_current_line_index].c_str());
if (m_revert_cursor_index >= 0)
{
- LineInfoW * info = (LineInfoW *)el_wline (m_editline);
+ LineInfoW * info = const_cast<LineInfoW *>(el_wline (m_editline));
info->cursor = info->buffer + m_revert_cursor_index;
if (info->cursor > info->lastchar)
{
OpenPOWER on IntegriCloud