Added the option to leave out the short parameter option

This commit is contained in:
johan
2013-08-11 13:13:19 +02:00
parent daabeaa03b
commit 29f6e41923
7 changed files with 59 additions and 57 deletions

View File

@@ -14,10 +14,9 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "getoptpp.h"
#include <stdexcept>
#include <cassert>
using namespace std;
@@ -199,7 +198,8 @@ Parameter::~Parameter() {}
const string& Parameter::description() const { return fdescription; }
const string& Parameter::longOption() const { return flongOption; }
char Parameter::shortOption() const { return fshortOption; }
bool Parameter::hasShortOption() const { return fshortOption != 0x0; }
char Parameter::shortOption() const { assert(hasShortOption()); return fshortOption; }
/*
*