fix a bunch of signed/unsigned comparison warnings, stop evaluating "getsize" every time through the loop.
llvm-svn: 113433
diff --git a/lldb/source/Commands/CommandObjectSource.cpp b/lldb/source/Commands/CommandObjectSource.cpp
index 65a95db..996eb79 100644
--- a/lldb/source/Commands/CommandObjectSource.cpp
+++ b/lldb/source/Commands/CommandObjectSource.cpp
@@ -283,7 +283,7 @@
if (m_options.m_modules.size() > 0)
{
ModuleList matching_modules;
- for (int i = 0; i < m_options.m_modules.size(); i++)
+ for (unsigned i = 0, e = m_options.m_modules.size(); i != e; i++)
{
FileSpec module_spec(m_options.m_modules[i].c_str());
if (module_spec)
@@ -457,7 +457,7 @@
if (m_options.m_modules.size() > 0)
{
ModuleList matching_modules;
- for (int i = 0; i < m_options.m_modules.size(); i++)
+ for (unsigned i = 0, e = m_options.m_modules.size(); i != e; i++)
{
FileSpec module_spec(m_options.m_modules[i].c_str());
if (module_spec)
@@ -495,7 +495,7 @@
bool got_multiple = false;
FileSpec *test_cu_spec = NULL;
- for (int i = 0; i < num_matches; i++)
+ for (unsigned i = 0; i < num_matches; i++)
{
sc_list.GetContextAtIndex(i, sc);
if (sc.comp_unit)