Browse Source

ScrollView.cpp: fix warning

1vanK 3 years ago
parent
commit
cc1d6eefb0
1 changed files with 1 additions and 2 deletions
  1. 1 2
      Source/Urho3D/UI/ScrollView.cpp

+ 1 - 2
Source/Urho3D/UI/ScrollView.cpp

@@ -108,9 +108,8 @@ void ScrollView::Update(float timeStep)
     {
     {
         Vector<UIElement*> dragElements = GetSubsystem<UI>()->GetDragElements();
         Vector<UIElement*> dragElements = GetSubsystem<UI>()->GetDragElements();
 
 
-        for (unsigned i = 0; i < dragElements.Size(); i++)
+        for (const UIElement* dragElement : dragElements)
         {
         {
-            UIElement* dragElement = dragElements[i];
             MouseButtonFlags dragButtons = dragElement->GetDragButtonCombo();
             MouseButtonFlags dragButtons = dragElement->GetDragButtonCombo();
 
 
             if (dragButtons != MOUSEB_LEFT)
             if (dragButtons != MOUSEB_LEFT)