Avoid returning a pointer to a temporary.
Issue found by cppcheck.
This commit is contained in:
parent
bec4e9d6c0
commit
187d5ad2ae
2 changed files with 1 additions and 5 deletions
|
@ -48,10 +48,6 @@ public:
|
|||
return stream_.str();
|
||||
}
|
||||
|
||||
const char* c_str() {
|
||||
return str().c_str();
|
||||
}
|
||||
|
||||
private:
|
||||
std::ostringstream stream_;
|
||||
};
|
||||
|
|
|
@ -89,7 +89,7 @@ std::string get_base_filename()
|
|||
static unsigned counter = 0;
|
||||
++counter;
|
||||
|
||||
return (formatter() << buf << '_' << counter << '_').c_str();
|
||||
return (formatter() << buf << '_' << counter << '_').str();
|
||||
}
|
||||
/***** ***** ***** ***** FLAGS ***** ***** ***** *****/
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue