Skip to content

Commit 98ab90b

Browse files
author
Hendrik Muhs
committed
do not return a temporary
1 parent dfd88ed commit 98ab90b

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

include/model/CForecastModelPersist.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class MODEL_EXPORT CForecastModelPersist final {
5252
const std::string& byFieldValue);
5353

5454
//! close the outputStream
55-
const std::string& finalizePersistAndGetFile();
55+
std::string finalizePersistAndGetFile();
5656

5757
private:
5858
static void persistOneModel(core::CStatePersistInserter& inserter,

lib/model/CForecastModelPersist.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ void CForecastModelPersist::CPersist::persistOneModel(core::CStatePersistInserte
6060
boost::cref(*model), _1));
6161
}
6262

63-
const std::string& CForecastModelPersist::CPersist::finalizePersistAndGetFile() {
63+
std::string CForecastModelPersist::CPersist::finalizePersistAndGetFile() {
6464
m_OutStream << "]";
6565
m_OutStream.close();
66+
6667
return m_FileName.string();
6768
}
6869

0 commit comments

Comments
 (0)