mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-19 00:56:08 -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
|
else
|
||||||
id = Arg::nameStartString() + _name;
|
id = Arg::nameStartString() + _name;
|
||||||
|
|
||||||
std::string delim = " ";
|
|
||||||
delim[0] = Arg::delimiter(); // ugly!!!
|
|
||||||
|
|
||||||
if ( _valueRequired )
|
if ( _valueRequired )
|
||||||
id += delim + "<" + valueId + ">";
|
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
|
||||||
|
|
||||||
if ( !_required )
|
if ( !_required )
|
||||||
id = "[" + id + "]";
|
id = "[" + id + "]";
|
||||||
@ -525,7 +522,7 @@ inline std::string Arg::longID( const std::string& valueId ) const
|
|||||||
id += Arg::flagStartString() + _flag;
|
id += Arg::flagStartString() + _flag;
|
||||||
|
|
||||||
if ( _valueRequired )
|
if ( _valueRequired )
|
||||||
id += " <" + valueId + ">";
|
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
|
||||||
|
|
||||||
id += ", ";
|
id += ", ";
|
||||||
}
|
}
|
||||||
@ -533,7 +530,7 @@ inline std::string Arg::longID( const std::string& valueId ) const
|
|||||||
id += Arg::nameStartString() + _name;
|
id += Arg::nameStartString() + _name;
|
||||||
|
|
||||||
if ( _valueRequired )
|
if ( _valueRequired )
|
||||||
id += " <" + valueId + ">";
|
id += std::string( 1, Arg::delimiter() ) + "<" + valueId + ">";
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
|
|
||||||
|
@ -8,13 +8,13 @@ USAGE:
|
|||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
-f <float>, --floatTest <float> (accepted multiple times)
|
-f=<float>, --floatTest=<float> (accepted multiple times)
|
||||||
multi float test
|
multi float test
|
||||||
|
|
||||||
-i <int>, --intTest <int> (accepted multiple times)
|
-i=<int>, --intTest=<int> (accepted multiple times)
|
||||||
multi int test
|
multi int test
|
||||||
|
|
||||||
--stringTest <string>
|
--stringTest=<string>
|
||||||
(required) string test
|
(required) string test
|
||||||
|
|
||||||
-B, --existTestB
|
-B, --existTestB
|
||||||
|
@ -8,13 +8,13 @@ USAGE:
|
|||||||
|
|
||||||
Where:
|
Where:
|
||||||
|
|
||||||
-f <float>, --floatTest <float> (accepted multiple times)
|
-f=<float>, --floatTest=<float> (accepted multiple times)
|
||||||
multi float test
|
multi float test
|
||||||
|
|
||||||
-i <int>, --intTest <int> (accepted multiple times)
|
-i=<int>, --intTest=<int> (accepted multiple times)
|
||||||
multi int test
|
multi int test
|
||||||
|
|
||||||
-s <string>, --stringTest <string>
|
-s=<string>, --stringTest=<string>
|
||||||
(required) string test
|
(required) string test
|
||||||
|
|
||||||
-B, --existTestB
|
-B, --existTestB
|
||||||
|
Loading…
x
Reference in New Issue
Block a user