brucem created this revision.
brucem added reviewers: ki.stfu, abidh.
brucem added a subscriber: lldb-commits.

GetVarFormatForChar needn't pass a char by const ref.

http://reviews.llvm.org/D10927

Files:
  tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
  tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h

Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
+++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
@@ -57,7 +57,7 @@
     // 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);
Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
+++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
@@ -234,22 +234,22 @@
 //++ 
------------------------------------------------------------------------------------
 // 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);
     }
 


Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
+++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.h
@@ -57,7 +57,7 @@
     // 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);
Index: tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
===================================================================
--- tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
+++ tools/lldb-mi/MICmnLLDBDebugSessionInfoVarObj.cpp
@@ -234,22 +234,22 @@
 //++ ------------------------------------------------------------------------------------
 // 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);
     }
 
_______________________________________________
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to