/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2011,2012,2014,2016,2019, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2014,2016,2019,2021, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
*/
#include "gmxpre.h"
-#include "messagestringcollector.h"
+#include "message_string_collector.h"
#include <vector>
}
}
+void MessageStringCollector::appendIf(bool condition, const char* message)
+{
+ if (condition)
+ {
+ append(std::string(message));
+ }
+}
+
+void MessageStringCollector::appendIf(bool condition, const std::string& message)
+{
+ if (condition)
+ {
+ append(message);
+ }
+}
+
void MessageStringCollector::finishContext()
{
GMX_RELEASE_ASSERT(!impl_->contexts_.empty(), "finishContext() called without context");