commit deda583497113d40c4700bea78a29ff277d63577
Author: Jean-Marc Lasgouttes <[email protected]>
Date: Thu Feb 13 12:22:39 2025 +0100
avoid temporary variable (spotted by Coverity Scan)
---
src/Session.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/Session.cpp b/src/Session.cpp
index 9ec18f1d01..0fc063bcd5 100644
--- a/src/Session.cpp
+++ b/src/Session.cpp
@@ -152,7 +152,6 @@ void LastOpenedSection::write(ostream & os) const
void LastOpenedSection::add(FileName const & file, bool active)
{
- LastOpenedFile lof(file, active);
// check if file is already recorded (this can happen
// with multiple buffer views). We do only record each
// file once, since we cannot restore multiple views
@@ -163,7 +162,7 @@ void LastOpenedSection::add(FileName const & file, bool
active)
if (last.file_name == file)
return;
}
- lastopened.push_back(lof);
+ lastopened.emplace_back(file, active);
}
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs