Don't call std::string::erase with end()
Change-Id: I64afcbe7138de7c7655a8107fd25e3ac8393a55d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175824 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
@@ -219,7 +219,9 @@ void recentUnoChanged( GtkWidget* pSelector, gpointer /* pItem */ )
|
||||
static void addToRecentUnoCommands(GtvApplicationWindow* pWindow, const std::string& rUnoCmd, std::string aArgs)
|
||||
{
|
||||
GtvMainToolbar* pToolbar = gtv_application_window_get_main_toolbar(pWindow);
|
||||
aArgs.erase(std::find(aArgs.begin(), aArgs.end(), '\n'));
|
||||
auto it = std::find(aArgs.begin(), aArgs.end(), '\n');
|
||||
if (it != aArgs.end())
|
||||
aArgs.erase(it);
|
||||
const std::string rUnoCmdStr = rUnoCmd + " | " + aArgs;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user