[Lldb-commits] [lldb] r241357 - [lldb-mi] Remove unnecessary members from MICmdArgContext.
Bruce Mitchener
bruce.mitchener at gmail.com
Fri Jul 3 08:30:38 PDT 2015
Author: brucem
Date: Fri Jul 3 10:30:38 2015
New Revision: 241357
URL: http://llvm.org/viewvc/llvm-project?rev=241357&view=rev
Log:
[lldb-mi] Remove unnecessary members from MICmdArgContext.
Summary:
Remove unnecessary members from MICmdArgContext.
We don't need constants for these value stored in every instance
of the class.
Reviewers: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D10926
Modified:
lldb/trunk/tools/lldb-mi/MICmdArgContext.cpp
lldb/trunk/tools/lldb-mi/MICmdArgContext.h
Modified: lldb/trunk/tools/lldb-mi/MICmdArgContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgContext.cpp?rev=241357&r1=241356&r2=241357&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgContext.cpp (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgContext.cpp Fri Jul 3 10:30:38 2015
@@ -18,8 +18,6 @@
// Throws: None.
//--
CMICmdArgContext::CMICmdArgContext(void)
- : m_constCharSpace(' ')
- , m_constStrSpace(" ")
{
}
@@ -32,8 +30,6 @@ CMICmdArgContext::CMICmdArgContext(void)
//--
CMICmdArgContext::CMICmdArgContext(const CMIUtilString &vrCmdLineArgsRaw)
: m_strCmdArgsAndOptions(vrCmdLineArgsRaw)
- , m_constCharSpace(' ')
- , m_constStrSpace(" ")
{
}
@@ -104,7 +100,7 @@ CMICmdArgContext::RemoveArg(const CMIUti
bool bPass1 = false;
if (nPos != 0)
{
- if (m_strCmdArgsAndOptions[nPos - 1] == m_constCharSpace)
+ if (m_strCmdArgsAndOptions[nPos - 1] == ' ')
bPass1 = true;
}
else
@@ -117,7 +113,7 @@ CMICmdArgContext::RemoveArg(const CMIUti
bool bPass2 = false;
if (nEnd < nLenCntxt)
{
- if (m_strCmdArgsAndOptions[nEnd] == m_constCharSpace)
+ if (m_strCmdArgsAndOptions[nEnd] == ' ')
{
bPass2 = true;
nExtraSpace = 1;
@@ -170,7 +166,7 @@ CMICmdArgContext::RemoveArgAtPos(const C
// Single words
strBuildContextUp += rWord;
if (bSpaceRequired)
- strBuildContextUp += m_constStrSpace;
+ strBuildContextUp += " ";
}
else
{
@@ -181,7 +177,7 @@ CMICmdArgContext::RemoveArgAtPos(const C
while (vArg != words)
{
if (bSpaceRequired)
- words += m_constStrSpace;
+ words += " ";
words += *it;
if (++it == itEnd)
break;
@@ -213,7 +209,7 @@ MIuint
CMICmdArgContext::GetNumberArgsPresent(void) const
{
CMIUtilString::VecString_t vecOptions;
- return m_strCmdArgsAndOptions.SplitConsiderQuotes(m_constStrSpace, vecOptions);
+ return m_strCmdArgsAndOptions.SplitConsiderQuotes(" ", vecOptions);
}
//++ ------------------------------------------------------------------------------------
@@ -227,7 +223,7 @@ CMIUtilString::VecString_t
CMICmdArgContext::GetArgs(void) const
{
CMIUtilString::VecString_t vecOptions;
- m_strCmdArgsAndOptions.SplitConsiderQuotes(m_constStrSpace, vecOptions);
+ m_strCmdArgsAndOptions.SplitConsiderQuotes(" ", vecOptions);
return vecOptions;
}
Modified: lldb/trunk/tools/lldb-mi/MICmdArgContext.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmdArgContext.h?rev=241357&r1=241356&r2=241357&view=diff
==============================================================================
--- lldb/trunk/tools/lldb-mi/MICmdArgContext.h (original)
+++ lldb/trunk/tools/lldb-mi/MICmdArgContext.h Fri Jul 3 10:30:38 2015
@@ -44,6 +44,4 @@ class CMICmdArgContext
// Attributes:
private:
CMIUtilString m_strCmdArgsAndOptions;
- const char m_constCharSpace;
- const CMIUtilString m_constStrSpace;
};
More information about the lldb-commits
mailing list