Fixed two compilation issues.
authorDavid van der Spoel <spoel@xray.bmc.uu.se>
Thu, 9 May 2013 16:29:35 +0000 (18:29 +0200)
committerDavid van der Spoel <spoel@xray.bmc.uu.se>
Thu, 16 May 2013 08:22:40 +0000 (10:22 +0200)
With new compilers and boost 1.5.3, since that version adds an
"explicit operator bool()" to the smart pointer classes, if
the compiler supports it.

Change-Id: I31862314479990adc8333e834dd16cbddbfcc387

src/gromacs/selection/parsetree.h
src/gromacs/utility/exceptions.cpp

index a313c2ecde34b1b75061397a5330da7edf36e554..6961a7503cba29cc75a098f39581b933fc38b158 100644 (file)
@@ -213,7 +213,7 @@ class SelectionParserValue
         }
 
         //! Returns true if the value comes from expression evaluation.
-        bool hasExpressionValue() const { return expr; }
+        bool hasExpressionValue() const { return static_cast<bool>(expr); }
 
         //! Returns the string value (\a type must be ::STR_VALUE).
         const std::string &stringValue() const
index 8c229a60541a0078596229df17b11e896c32f670..1854b5e8203ac118c7032e400f6506fcf433be8c 100644 (file)
@@ -78,7 +78,7 @@ class ErrorMessage
         explicit ErrorMessage(const std::string &text);
 
         //! Whether this object is a context string.
-        bool isContext() const { return child_; }
+        bool isContext() const { return static_cast<bool>(child_); }
         //! Returns the text for this object.
         const std::string &text() const { return text_; }
         /*! \brief