Author: brucem Date: Fri Jul 3 10:30:48 2015 New Revision: 241358 URL: http://llvm.org/viewvc/llvm-project?rev=241358&view=rev Log: [lldb-mi] GetVarFormatForChar needn't pass a char by const ref.
Summary: GetVarFormatForChar needn't pass a char by const ref. Reviewers: ki.stfu, abidh Subscribers: lldb-commits Differential Revision: http://reviews.llvm.org/D10927 Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp?rev=241358&r1=241357&r2=241358&view=diff ============================================================================== --- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp (original) +++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp Fri Jul 3 10:30:48 2015 @@ -234,22 +234,22 @@ CMICmnLLDBDebugSessionInfoVarObj::GetVar //++ ------------------------------------------------------------------------------------ // 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); } Modified: lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h?rev=241358&r1=241357&r2=241358&view=diff ============================================================================== --- lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h (original) +++ lldb/trunk/tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h Fri Jul 3 10:30:48 2015 @@ -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); _______________________________________________ lldb-commits mailing list lldb-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits