From de20ba6763d689698dc7436324d81b256ffe3c44 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 24 Jan 2014 06:10:19 +0100 Subject: [PATCH] [PATCH] Types in isRecordTypeWithoutSideEffects The type definition of the iterator should match the type definition of the map . --- lib/checkunusedvar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/checkunusedvar.cpp b/lib/checkunusedvar.cpp index 112332d60..14410ac43 100644 --- a/lib/checkunusedvar.cpp +++ b/lib/checkunusedvar.cpp @@ -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::iterator,bool> found=isRecordTypeWithoutSideEffectsMap.insert( - std::pair(type,false)); //Initialize with side effects for possilbe recursions + std::pair::iterator,bool> found=isRecordTypeWithoutSideEffectsMap.insert( + std::pair(type,false)); //Initialize with side effects for possible recursions bool & withoutSideEffects=found.first->second; if (!found.second) return withoutSideEffects;