// 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) )
}
}
- // 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
// ----------------------------------------------------------------------------