mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-09 12:23:39 -04:00
cleaned up iterator names
This commit is contained in:
parent
d584e762ce
commit
e02172004f
@ -332,11 +332,21 @@ class Arg
|
|||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Typedef of a list iterator.
|
* Typedef of an Arg list iterator.
|
||||||
|
*/
|
||||||
|
typedef std::list<Arg*>::iterator ArgListIterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Typedef of an Arg vector iterator.
|
||||||
*/
|
*/
|
||||||
typedef std::list<Arg*>::iterator ArgIterator;
|
|
||||||
typedef std::vector<Arg*>::iterator ArgVectorIterator;
|
typedef std::vector<Arg*>::iterator ArgVectorIterator;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Typedef of a Visitor list iterator.
|
||||||
|
*/
|
||||||
|
typedef std::list<Visitor*>::iterator VisitorListIterator;
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
//BEGIN Arg.cpp
|
//BEGIN Arg.cpp
|
||||||
//////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////
|
||||||
|
@ -278,8 +278,8 @@ inline CmdLine::CmdLine(const std::string& m,
|
|||||||
|
|
||||||
inline CmdLine::~CmdLine()
|
inline CmdLine::~CmdLine()
|
||||||
{
|
{
|
||||||
std::list<Arg*>::iterator argIter;
|
ArgListIterator argIter;
|
||||||
std::list<Visitor*>::iterator visIter;
|
VisitorListIterator visIter;
|
||||||
|
|
||||||
for( argIter = _argDeleteOnExitList.begin();
|
for( argIter = _argDeleteOnExitList.begin();
|
||||||
argIter != _argDeleteOnExitList.end();
|
argIter != _argDeleteOnExitList.end();
|
||||||
@ -354,8 +354,8 @@ inline void CmdLine::add( Arg& a )
|
|||||||
|
|
||||||
inline void CmdLine::add( Arg* a )
|
inline void CmdLine::add( Arg* a )
|
||||||
{
|
{
|
||||||
for( ArgIterator iter = _argList.begin(); iter != _argList.end(); iter++ )
|
for( ArgListIterator it = _argList.begin(); it != _argList.end(); it++ )
|
||||||
if ( *a == *(*iter) )
|
if ( *a == *(*it) )
|
||||||
throw( SpecificationException(
|
throw( SpecificationException(
|
||||||
"Argument with same flag/name already exists!",
|
"Argument with same flag/name already exists!",
|
||||||
a->longID() ) );
|
a->longID() ) );
|
||||||
@ -382,7 +382,7 @@ inline void CmdLine::parse(int argc, char** argv)
|
|||||||
for (int i = 0; (unsigned int)i < args.size(); i++)
|
for (int i = 0; (unsigned int)i < args.size(); i++)
|
||||||
{
|
{
|
||||||
bool matched = false;
|
bool matched = false;
|
||||||
for (ArgIterator it = _argList.begin(); it != _argList.end(); it++)
|
for (ArgListIterator it = _argList.begin(); it != _argList.end(); it++)
|
||||||
{
|
{
|
||||||
if ( (*it)->processArg( &i, args ) )
|
if ( (*it)->processArg( &i, args ) )
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <ostream>
|
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ inline void StdOutput::_shortUsage( CmdLineInterface& _cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// then the rest
|
// then the rest
|
||||||
for (ArgIterator it = argList.begin(); it != argList.end(); it++)
|
for (ArgListIterator it = argList.begin(); it != argList.end(); it++)
|
||||||
if ( !xorHandler.contains( (*it) ) )
|
if ( !xorHandler.contains( (*it) ) )
|
||||||
s += " " + (*it)->shortID();
|
s += " " + (*it)->shortID();
|
||||||
|
|
||||||
@ -199,7 +199,7 @@ inline void StdOutput::_longUsage( CmdLineInterface& _cmd,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// then the rest
|
// then the rest
|
||||||
for (ArgIterator it = argList.begin(); it != argList.end(); it++)
|
for (ArgListIterator it = argList.begin(); it != argList.end(); it++)
|
||||||
if ( !xorHandler.contains( (*it) ) )
|
if ( !xorHandler.contains( (*it) ) )
|
||||||
{
|
{
|
||||||
spacePrint( os, (*it)->longID(), 75, 3, 3 );
|
spacePrint( os, (*it)->longID(), 75, 3, 3 );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user