mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Avoid an unnecessary string copy
Spotted by Coverity scan.
This commit is contained in:
parent
a47d66df34
commit
851e59cd26
@ -245,14 +245,13 @@ LyXVC::CommandResult LyXVC::checkIn(string & log)
|
||||
LYXERR(Debug::LYXVC, "LyXVC: checkIn");
|
||||
if (!vcs_)
|
||||
return ErrorBefore;
|
||||
docstring empty(_("(no log message)"));
|
||||
docstring response;
|
||||
bool ok = true;
|
||||
if (vcs_->isCheckInWithConfirmation())
|
||||
ok = Alert::askForText(response, _("LyX VC: Log Message"));
|
||||
if (ok) {
|
||||
if (response.empty())
|
||||
response = empty;
|
||||
response = _("(no log message)");
|
||||
//shell collisions
|
||||
response = subst(response, from_ascii("\""), from_ascii("\\\""));
|
||||
return vcs_->checkIn(to_utf8(response), log);
|
||||
|
Loading…
Reference in New Issue
Block a user