From b7c3d9f7fd8b50b68164fd07f304363b66ae2156 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Mon, 11 Jan 2021 19:10:52 +0100
Subject: [PATCH] [MeL/IO] Fix references of function arguments.

The string argument can not be moved, because OGS_FATAL
is a macro where the formatting is used twice.

The Args fix is for correct perfect forwarding.
---
 MeshLib/IO/XDMF/HdfWriter.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/MeshLib/IO/XDMF/HdfWriter.cpp b/MeshLib/IO/XDMF/HdfWriter.cpp
index f7b7938593a..9faddc5cf82 100644
--- a/MeshLib/IO/XDMF/HdfWriter.cpp
+++ b/MeshLib/IO/XDMF/HdfWriter.cpp
@@ -20,8 +20,8 @@
 #include "fileIO.h"
 
 template <typename... Args>
-void checkHdfStatus(const hid_t status, const std::string formatting,
-                    Args... args)
+void checkHdfStatus(const hid_t status, std::string const& formatting,
+                    Args&&... args)
 {
     if (status < 0)
     {
@@ -199,4 +199,4 @@ bool HdfWriter::writeStep(int const step) const
     status = H5Fclose(file);
     return (status >= 0);
 }
-}  // namespace MeshLib::IO
\ No newline at end of file
+}  // namespace MeshLib::IO
-- 
GitLab