mirror of
https://github.com/cuberite/TCLAP.git
synced 2025-09-08 11:49: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 of a Visitor list iterator.
|
||||
*/
|
||||
typedef std::list<Visitor*>::iterator VisitorListIterator;
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
//BEGIN Arg.cpp
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -278,8 +278,8 @@ inline CmdLine::CmdLine(const std::string& m,
|
||||
|
||||
inline CmdLine::~CmdLine()
|
||||
{
|
||||
std::list<Arg*>::iterator argIter;
|
||||
std::list<Visitor*>::iterator visIter;
|
||||
ArgListIterator argIter;
|
||||
VisitorListIterator visIter;
|
||||
|
||||
for( argIter = _argDeleteOnExitList.begin();
|
||||
argIter != _argDeleteOnExitList.end();
|
||||
@ -354,8 +354,8 @@ inline void CmdLine::add( Arg& a )
|
||||
|
||||
inline void CmdLine::add( Arg* a )
|
||||
{
|
||||
for( ArgIterator iter = _argList.begin(); iter != _argList.end(); iter++ )
|
||||
if ( *a == *(*iter) )
|
||||
for( ArgListIterator it = _argList.begin(); it != _argList.end(); it++ )
|
||||
if ( *a == *(*it) )
|
||||
throw( SpecificationException(
|
||||
"Argument with same flag/name already exists!",
|
||||
a->longID() ) );
|
||||
@ -382,7 +382,7 @@ inline void CmdLine::parse(int argc, char** argv)
|
||||
for (int i = 0; (unsigned int)i < args.size(); i++)
|
||||
{
|
||||
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 ) )
|
||||
{
|
||||
|
@ -27,7 +27,6 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
#include <iostream>
|
||||
#include <ostream>
|
||||
#include <iomanip>
|
||||
#include <algorithm>
|
||||
|
||||
|
@ -167,7 +167,7 @@ inline void StdOutput::_shortUsage( CmdLineInterface& _cmd,
|
||||
}
|
||||
|
||||
// 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) ) )
|
||||
s += " " + (*it)->shortID();
|
||||
|
||||
@ -199,7 +199,7 @@ inline void StdOutput::_longUsage( CmdLineInterface& _cmd,
|
||||
}
|
||||
|
||||
// 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) ) )
|
||||
{
|
||||
spacePrint( os, (*it)->longID(), 75, 3, 3 );
|
||||
|
Loading…
x
Reference in New Issue
Block a user