]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/ctrlcmn.cpp
support for @2x notation for wxBITMAP_TYPE_PNG (non-resource) on retina displays
[wxWidgets.git] / src / common / ctrlcmn.cpp
index af5c83292f14b37609e9fdaef016eea5fde85823..5130048c9dfb8d900c72f79e57412c0e18b61a38 100644 (file)
@@ -540,15 +540,10 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
             // add this (ellipsized) row to the rest of the label
             ret << curLine;
             if ( pc == label.end() )
-            {
-                // NOTE: this is the return which always exits the function
-                return ret;
-            }
-            else
-            {
-                ret << *pc;
-                curLine.clear();
-            }
+                break;
+
+            ret << *pc;
+            curLine.clear();
         }
         // we need to remove mnemonics from the label for correct calculations
         else if ( *pc == wxS('&') && (flags & wxELLIPSIZE_FLAGS_PROCESS_MNEMONICS) )
@@ -571,14 +566,9 @@ wxString wxControlBase::Ellipsize(const wxString& label, const wxDC& dc,
         }
     }
 
-    // this return would generate a
-    //  warning C4702: unreachable code
-    // with MSVC since the function always exits from inside the loop
-    //return ret;
+    return ret;
 }
 
-
-
 // ----------------------------------------------------------------------------
 // wxStaticBitmap
 // ----------------------------------------------------------------------------