[PATCH] Types in isRecordTypeWithoutSideEffects

The type definition of the iterator should match the type definition of the map <const Type *, bool>.
This commit is contained in:
Heinrich Schuchardt 2014-01-24 06:10:19 +01:00 committed by Daniel Marjamäki
parent 1edd43253d
commit de20ba6763
1 changed files with 2 additions and 2 deletions

View File

@ -1270,8 +1270,8 @@ bool CheckUnusedVar::isRecordTypeWithoutSideEffects(const Type* type)
// a type that has no side effects (no constructors and no members with constructors)
/** @todo false negative: check constructors for side effects */
std::pair<std::map<Type const *,bool>::iterator,bool> found=isRecordTypeWithoutSideEffectsMap.insert(
std::pair<const Type *,bool>(type,false)); //Initialize with side effects for possilbe recursions
std::pair<std::map<const Type *,bool>::iterator,bool> found=isRecordTypeWithoutSideEffectsMap.insert(
std::pair<const Type *,bool>(type,false)); //Initialize with side effects for possible recursions
bool & withoutSideEffects=found.first->second;
if (!found.second)
return withoutSideEffects;