mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-17 08:05:12 -04:00
fixed the delimiter in Arg::longID and Arg::shortID
This commit is contained in:
parent
b4787eb4bd
commit
891ad51730
@ -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;
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user