Skip to content
Snippets Groups Projects
Commit 5e7fc219 authored by graeser's avatar graeser Committed by graeser
Browse files

Fix argument order and missing type name

[[Imported from SVN: r13088]]
parent b8580747
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ std::string formatString(const std::string& s, const T&... args)
static const int bufferSize=1000;
char buffer[bufferSize];
r = std::snprintf(buffer, s.c_str(), bufferSize, args...);
int r = std::snprintf(buffer, bufferSize, s.c_str(), args...);
// negative return values correspond to errors
if (r<0)
......@@ -37,7 +37,7 @@ std::string formatString(const std::string& s, const T&... args)
char* dynamicBuffer = new char[dynamicBufferSize];
// convert and check for errors again
r = std::snprintf(dynamicBuffer, s.c_str(), dynamicBufferSize, args...);
r = std::snprintf(dynamicBuffer, dynamicBufferSize, s.c_str(), args...);
if (r<0)
DUNE_THROW(Dune::Exception,"Could not convert format string using given arguments.");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment