X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a78a9378207266c55b7f4c72fbfb2ae11963d0b..a4ea083bbdf710d3234dcbd2eafb5d0e078f8348:/src/common/ctrlcmn.cpp diff --git a/src/common/ctrlcmn.cpp b/src/common/ctrlcmn.cpp index af5c83292f..32bce06c6f 100644 --- a/src/common/ctrlcmn.cpp +++ b/src/common/ctrlcmn.cpp @@ -4,7 +4,6 @@ // Author: Vadim Zeitlin // Modified by: // Created: 26.07.99 -// RCS-ID: $Id$ // Copyright: (c) wxWidgets team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -540,15 +539,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 +565,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 // ----------------------------------------------------------------------------