Refactor: fix member shadowing, return by const ref (#3407)
This commit is contained in:
parent
a0c37ceba2
commit
ee4d90b4fa
|
@ -441,7 +441,7 @@ std::list<Suppressions::Suppression> Suppressions::getUnmatchedGlobalSuppression
|
|||
return result;
|
||||
}
|
||||
|
||||
std::list<Suppressions::Suppression> Suppressions::getSuppressions() const
|
||||
const std::list<Suppressions::Suppression> &Suppressions::getSuppressions() const
|
||||
{
|
||||
return mSuppressions;
|
||||
}
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
* @brief Returns list of all suppressions.
|
||||
* @return list of suppressions
|
||||
*/
|
||||
std::list<Suppression> getSuppressions() const;
|
||||
const std::list<Suppression> &getSuppressions() const;
|
||||
|
||||
private:
|
||||
/** @brief List of error which the user doesn't want to see. */
|
||||
|
|
|
@ -4193,8 +4193,8 @@ void Scope::addVariable(const Token *token_, const Token *start_, const Token *e
|
|||
void Scope::getVariableList(const Settings* settings)
|
||||
{
|
||||
if (!bodyStartList.empty()) {
|
||||
for (const Token *bodyStart: bodyStartList)
|
||||
getVariableList(settings, bodyStart->next());
|
||||
for (const Token *bs: bodyStartList)
|
||||
getVariableList(settings, bs->next());
|
||||
}
|
||||
|
||||
// global scope
|
||||
|
|
Loading…
Reference in New Issue