From 266a86b84de2b6b046245b72612d71a5dbeeb131 Mon Sep 17 00:00:00 2001 From: mes5k Date: Sun, 23 Jan 2005 22:29:10 +0000 Subject: [PATCH] Fixed minor bug involving combined switch error messages: now they're consistent. --- include/tclap/SwitchArg.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/tclap/SwitchArg.h b/include/tclap/SwitchArg.h index 0e4576f..e69688f 100644 --- a/include/tclap/SwitchArg.h +++ b/include/tclap/SwitchArg.h @@ -45,7 +45,6 @@ class SwitchArg : public Arg */ bool _value; - public: /** @@ -108,6 +107,7 @@ class SwitchArg : public Arg * Returns bool, whether or not the switch has been set. */ bool getValue(); + }; ////////////////////////////////////////////////////////////////////// @@ -179,7 +179,7 @@ inline bool SwitchArg::processArg(int *i, std::vector& args) if ( argMatches( args[*i] ) ) ret = true; - if ( _alreadySet ) + if ( _alreadySet || ( !ret && combinedSwitchesMatch( args[*i] ) ) ) throw(CmdLineParseException("Argument already set!", toString())); _alreadySet = true;