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
Branches
Tags
No related merge requests found
...@@ -21,7 +21,7 @@ std::string formatString(const std::string& s, const T&... args) ...@@ -21,7 +21,7 @@ std::string formatString(const std::string& s, const T&... args)
static const int bufferSize=1000; static const int bufferSize=1000;
char buffer[bufferSize]; 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 // negative return values correspond to errors
if (r<0) if (r<0)
...@@ -37,7 +37,7 @@ std::string formatString(const std::string& s, const T&... args) ...@@ -37,7 +37,7 @@ std::string formatString(const std::string& s, const T&... args)
char* dynamicBuffer = new char[dynamicBufferSize]; char* dynamicBuffer = new char[dynamicBufferSize];
// convert and check for errors again // 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) if (r<0)
DUNE_THROW(Dune::Exception,"Could not convert format string using given arguments."); 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