RagePhoto: dont take reference from save function

This commit is contained in:
Syping 2024-03-25 13:15:26 +01:00
parent 0611a368a6
commit c55b99e23f

View file

@ -986,7 +986,7 @@ const std::string RagePhoto::save(bool *ok)
bool RagePhoto::saveFile(const char *filename, uint32_t photoFormat) bool RagePhoto::saveFile(const char *filename, uint32_t photoFormat)
{ {
bool ok; bool ok;
const std::string &sdata = save(photoFormat, &ok); const std::string sdata = save(photoFormat, &ok);
if (ok) { if (ok) {
std::ofstream ofs(filename, std::ios::out | std::ios::binary | std::ios::trunc); std::ofstream ofs(filename, std::ios::out | std::ios::binary | std::ios::trunc);
if (!ofs.is_open()) { if (!ofs.is_open()) {