aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/resolvedfilecontext.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@digia.com>2014-08-26 14:42:04 +0200
committerChristian Kandeler <christian.kandeler@digia.com>2014-08-29 09:16:01 +0200
commita3207a7293f0ee06d51146a6e98c3a3b1833ae54 (patch)
tree7b22b9dbe0d5c59422ece736a0ce7c0aa100a9d6 /src/lib/corelib/language/resolvedfilecontext.cpp
parent58f3c809ec0c7e9a9ddc87a6baf926738513bbd0 (diff)
Fix equality operators.
The Standard does not allow to dereference null pointers, even if that reference is then only used to compare the pointer values. So introduce a wrapper function that does the pointer-related checks first. Task-number: QBS-674 Change-Id: I9a14b4871b91102699f09ed922b9ab0e0265209a Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Diffstat (limited to 'src/lib/corelib/language/resolvedfilecontext.cpp')
-rw-r--r--src/lib/corelib/language/resolvedfilecontext.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/lib/corelib/language/resolvedfilecontext.cpp b/src/lib/corelib/language/resolvedfilecontext.cpp
index 50cf241ed..7ef99c6e9 100644
--- a/src/lib/corelib/language/resolvedfilecontext.cpp
+++ b/src/lib/corelib/language/resolvedfilecontext.cpp
@@ -73,10 +73,6 @@ void ResolvedFileContext::store(PersistentPool &pool) const
bool operator==(const ResolvedFileContext &a, const ResolvedFileContext &b)
{
- if (&a == &b)
- return true;
- if (!!&a != !!&b)
- return false;
return a.filePath() == b.filePath()
&& a.jsExtensions() == b.jsExtensions()
&& a.jsImports() == b.jsImports();