From bf5f9f2655c29cd52d8358375f320a1fbc33e5cc Mon Sep 17 00:00:00 2001
From: Giovanni Bussi <giovanni.bussi@gmail.com>
Date: Tue, 15 Jan 2013 11:14:11 +0100
Subject: [PATCH] Fixed one assert so that code can be run without assertions

I think we should always use assertions (as now they also detect most of
the user errors). Anyway, in this manner it is possible to undefine them
to monitor their impact on performance, which is expected to be negligible.
---
 src/core/CLTool.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/core/CLTool.h b/src/core/CLTool.h
index f0f216037..8afab7098 100644
--- a/src/core/CLTool.h
+++ b/src/core/CLTool.h
@@ -100,7 +100,8 @@ bool CLTool::parse(const std::string&key,T&t){
   plumed_massert(keywords.exists(key),"keyword " + key + " has not been registered");
   if(keywords.style(key,"compulsory") ){
      plumed_assert(inputData.count(key)>0);
-     plumed_assert( Tools::convert(inputData[key],t) );
+     bool check=Tools::convert(inputData[key],t);
+     plumed_assert(check);
      return true;
   }
   if( inputData.count(key)==0 ) return false; 
-- 
GitLab