fixed the delimiter in Arg::longID and Arg::shortID

This commit is contained in:
mes5k 2007-09-13 02:09:48 +00:00
parent b4787eb4bd
commit 891ad51730
3 changed files with 9 additions and 12 deletions

View File

@ -504,11 +504,8 @@ inline std::string Arg::shortID( const std::string& valueId ) const
else
id = Arg::nameStartString() + _name;
std::string delim = " ";
delim[0] = Arg::delimiter(); // ugly!!!
if ( _valueRequired )
id += delim + "<" + valueId + ">";
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
if ( !_required )
id = "[" + id + "]";
@ -525,7 +522,7 @@ inline std::string Arg::longID( const std::string& valueId ) const
id += Arg::flagStartString() + _flag;
if ( _valueRequired )
id += " <" + valueId + ">";
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
id += ", ";
}
@ -533,7 +530,7 @@ inline std::string Arg::longID( const std::string& valueId ) const
id += Arg::nameStartString() + _name;
if ( _valueRequired )
id += " <" + valueId + ">";
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
return id;

View File

@ -8,13 +8,13 @@ USAGE:
Where:
-f <float>, --floatTest <float> (accepted multiple times)
-f=<float>, --floatTest=<float> (accepted multiple times)
multi float test
-i <int>, --intTest <int> (accepted multiple times)
-i=<int>, --intTest=<int> (accepted multiple times)
multi int test
--stringTest <string>
--stringTest=<string>
(required) string test
-B, --existTestB

View File

@ -8,13 +8,13 @@ USAGE:
Where:
-f <float>, --floatTest <float> (accepted multiple times)
-f=<float>, --floatTest=<float> (accepted multiple times)
multi float test
-i <int>, --intTest <int> (accepted multiple times)
-i=<int>, --intTest=<int> (accepted multiple times)
multi int test
-s <string>, --stringTest <string>
-s=<string>, --stringTest=<string>
(required) string test
-B, --existTestB