commit ea5e9153b0b8ccbd613051bba9b43dade786a546
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Thu Feb 13 11:35:48 2025 +0100
Avoid another temp variable (spotted by Coverity Scan)
---
src/frontends/qt/GuiApplication.cpp | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/frontends/qt/GuiApplication.cpp
b/src/frontends/qt/GuiApplication.cpp
index 8bca59300b..1e1804149f 100644
--- a/src/frontends/qt/GuiApplication.cpp
+++ b/src/frontends/qt/GuiApplication.cpp
@@ -1829,16 +1829,15 @@ void GuiApplication::dispatch(FuncRequest const & cmd,
DispatchResult & dr)
case LFUN_BUFFER_NEW_TEMPLATE: {
string const file = (cmd.getArg(0) == "newfile") ? string() :
cmd.getArg(0);
- string const temp = cmd.getArg(1);
validateCurrentView();
if (!current_view_
|| (!lyxrc.open_buffers_in_tabs &&
current_view_->documentBufferView() != nullptr)) {
createAndShowView();
- current_view_->newDocument(file, temp, true);
+ current_view_->newDocument(file, cmd.getArg(1), true);
if (!current_view_->documentBufferView())
current_view_->close();
} else {
- current_view_->newDocument(file, temp, true);
+ current_view_->newDocument(file, cmd.getArg(1), true);
}
break;
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs