Return argument parents by reference
This commit is contained in:
parent
bfdd6ada2b
commit
6d2544b908
|
@ -319,7 +319,7 @@ public:
|
||||||
void setSubArguments(const ArgumentInitializerList &subArguments);
|
void setSubArguments(const ArgumentInitializerList &subArguments);
|
||||||
void addSubArgument(Argument *arg);
|
void addSubArgument(Argument *arg);
|
||||||
bool hasSubArguments() const;
|
bool hasSubArguments() const;
|
||||||
const ArgumentVector parents() const;
|
const ArgumentVector &parents() const;
|
||||||
void printInfo(std::ostream &os, unsigned char indentation = 0) const;
|
void printInfo(std::ostream &os, unsigned char indentation = 0) const;
|
||||||
|
|
||||||
// declare getter/setter/properties for bash completion: those properties must be set *before parsing
|
// declare getter/setter/properties for bash completion: those properties must be set *before parsing
|
||||||
|
@ -979,10 +979,8 @@ inline bool Argument::hasSubArguments() const
|
||||||
*
|
*
|
||||||
* If this argument is used as a main argument shouldn't be used as
|
* If this argument is used as a main argument shouldn't be used as
|
||||||
* secondary argument at the same time and thus have no parents.
|
* secondary argument at the same time and thus have no parents.
|
||||||
*
|
|
||||||
* \todo Return by reference in v5.
|
|
||||||
*/
|
*/
|
||||||
inline const ArgumentVector Argument::parents() const
|
inline const ArgumentVector &Argument::parents() const
|
||||||
{
|
{
|
||||||
return m_parents;
|
return m_parents;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue