aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Interpreter/CommandObject.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/Interpreter/CommandObject.cpp
parent9bbc3653c5ccb170167b2ab3c4ec098be83a3d04 (diff)
downloadllvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.zip
llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.tar.gz
llvm-d7e6a4f2f07464acfe4fe98b4e4038c67c7b2975.tar.bz2
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/Interpreter/CommandObject.cpp')
-rw-r--r--lldb/source/Interpreter/CommandObject.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Interpreter/CommandObject.cpp b/lldb/source/Interpreter/CommandObject.cpp
index 494a008..f6e5bca 100644
--- a/lldb/source/Interpreter/CommandObject.cpp
+++ b/lldb/source/Interpreter/CommandObject.cpp
@@ -506,14 +506,14 @@ CommandObject::GetArgumentEntryAtIndex (int idx)
return nullptr;
}
-CommandObject::ArgumentTableEntry *
+const CommandObject::ArgumentTableEntry *
CommandObject::FindArgumentDataByType (CommandArgumentType arg_type)
{
const ArgumentTableEntry *table = CommandObject::GetArgumentTable();
for (int i = 0; i < eArgTypeLastArg; ++i)
if (table[i].arg_type == arg_type)
- return (ArgumentTableEntry *) &(table[i]);
+ return &(table[i]);
return nullptr;
}
@@ -522,7 +522,7 @@ void
CommandObject::GetArgumentHelp (Stream &str, CommandArgumentType arg_type, CommandInterpreter &interpreter)
{
const ArgumentTableEntry* table = CommandObject::GetArgumentTable();
- ArgumentTableEntry *entry = (ArgumentTableEntry *) &(table[arg_type]);
+ const ArgumentTableEntry *entry = &(table[arg_type]);
// The table is *supposed* to be kept in arg_type order, but someone *could* have messed it up...
@@ -556,7 +556,7 @@ CommandObject::GetArgumentHelp (Stream &str, CommandArgumentType arg_type, Comma
const char *
CommandObject::GetArgumentName (CommandArgumentType arg_type)
{
- ArgumentTableEntry *entry = (ArgumentTableEntry *) &(CommandObject::GetArgumentTable()[arg_type]);
+ const ArgumentTableEntry *entry = &(CommandObject::GetArgumentTable()[arg_type]);
// The table is *supposed* to be kept in arg_type order, but someone *could* have messed it up...