Skip to content

Commit

Permalink
[lldb-mi] GetVarFormatForChar needn't pass a char by const ref.
Browse files Browse the repository at this point in the history
Summary: GetVarFormatForChar needn't pass a char by const ref.

Reviewers: ki.stfu, abidh

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D10927

llvm-svn: 241358
  • Loading branch information
waywardmonkeys committed Jul 3, 2015
1 parent 53be300 commit 44519f8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
Expand Up @@ -234,22 +234,22 @@ CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForString(const CMIUtilString &vrS
//++ ------------------------------------------------------------------------------------
// Details: Retrieve the var format enumeration for the specified character.
// Type: Static method.
// Args: vrcFormat - (R) Character representing the var format.
// Args: vcFormat - Character representing the var format.
// Return: varFormat_e - Var format enumeration.
// - No match found return eVarFormat_Invalid.
// Throws: None.
//--
CMICmnLLDBDebugSessionInfoVarObj::varFormat_e
CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(const char &vrcFormat)
CMICmnLLDBDebugSessionInfoVarObj::GetVarFormatForChar(char vcFormat)
{
if ('r' == vrcFormat)
if ('r' == vcFormat)
return eVarFormat_Hex;

// CODETAG_SESSIONINFO_VARFORMAT_ENUM
for (MIuint i = 0; i < eVarFormat_count; i++)
{
const char *pVarFormatChar = ms_aVarFormatChars[i];
if (*pVarFormatChar == vrcFormat)
if (*pVarFormatChar == vcFormat)
return static_cast<varFormat_e>(i);
}

Expand Down
2 changes: 1 addition & 1 deletion lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
Expand Up @@ -57,7 +57,7 @@ class CMICmnLLDBDebugSessionInfoVarObj
// Statics:
public:
static varFormat_e GetVarFormatForString(const CMIUtilString &vrStrFormat);
static varFormat_e GetVarFormatForChar(const char &vrcFormat);
static varFormat_e GetVarFormatForChar(char vcFormat);
static CMIUtilString GetValueStringFormatted(const lldb::SBValue &vrValue, const varFormat_e veVarFormat);
static void VarObjAdd(const CMICmnLLDBDebugSessionInfoVarObj &vrVarObj);
static void VarObjDelete(const CMIUtilString &vrVarName);
Expand Down

0 comments on commit 44519f8

Please sign in to comment.