Browse Source

post-pended member variables with an underscore

raheelx 9 years ago
parent
commit
e771e77228
2 changed files with 18 additions and 18 deletions
  1. 15 15
      Source/Atomic/UI/UIListView.cpp
  2. 3 3
      Source/Atomic/UI/UIListView.h

+ 15 - 15
Source/Atomic/UI/UIListView.cpp

@@ -400,7 +400,7 @@ static int select_list_sort_cb(TBSelectItemSource *_source, const int *a, const
 
 UIListView::UIListView(Context* context, bool createWidget) :
     UIWidget(context, createWidget),
-    source_(0), itemLookupId_(0), multiSelect_(false), moveDelta_(0.0f), pivot(nullptr), pivotIndex(0), startNewSelection(true)
+    source_(0), itemLookupId_(0), multiSelect_(false), moveDelta_(0.0f), pivot_(nullptr), pivotIndex_(0), startNewSelection_(true)
 {
     rootList_ = new UISelectList(context);
     rootList_->SetUIListView(true);
@@ -898,20 +898,20 @@ bool UIListView::OnEvent(const tb::TBWidgetEvent &ev)
 
                 if (shiftMulti)
                 {
-                    if (startNewSelection)
+                    if (startNewSelection_)
                         SelectAllItems(false);
 
-                    if (!pivot)
+                    if (!pivot_)
                     {
-                        pivotIndex = 0;
-                        pivot = source_->GetItem(pivotIndex);
+                        pivotIndex_ = 0;
+                        pivot_ = source_->GetItem(pivotIndex_);
                     }
 
                     SetValueFirstSelected();
 
-                    if (i > pivotIndex)
+                    if (i > pivotIndex_)
                     {
-                        for (int j = pivotIndex; j < i; j++)
+                        for (int j = pivotIndex_; j < i; j++)
                         {
                             ListViewItem* itemSelect = source_->GetItem(j);
 
@@ -919,9 +919,9 @@ bool UIListView::OnEvent(const tb::TBWidgetEvent &ev)
                                 SelectItem(itemSelect, true);
                         }
                     }
-                    else if (i < pivotIndex)
+                    else if (i < pivotIndex_)
                     {
-                        for (int j = pivotIndex; j > i; j--)
+                        for (int j = pivotIndex_; j > i; j--)
                         {
                             ListViewItem* itemSelect = source_->GetItem(j);
 
@@ -947,17 +947,17 @@ bool UIListView::OnEvent(const tb::TBWidgetEvent &ev)
                     SetValueFirstSelected();
                     UpdateItemVisibility();
 
-                    pivot = item;
-                    pivotIndex = i;
-                    startNewSelection = false;
+                    pivot_ = item;
+                    pivotIndex_ = i;
+                    startNewSelection_ = false;
                 }
                 else
                 {
                     SelectSingleItem(item, false);
 
-                    pivot = item;
-                    pivotIndex = i;
-                    startNewSelection = true;
+                    pivot_ = item;
+                    pivotIndex_ = i;
+                    startNewSelection_ = true;
                 }
 
                 return true;

+ 3 - 3
Source/Atomic/UI/UIListView.h

@@ -98,9 +98,9 @@ private:
 
     void SelectItem(ListViewItem* item, bool select);
 
-    ListViewItem* pivot;
-    int pivotIndex;
-    bool startNewSelection;
+    ListViewItem* pivot_;
+    int pivotIndex_;
+    bool startNewSelection_;
 
 };