summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/include/IceUtil/Handle.h')
-rw-r--r--cpp/include/IceUtil/Handle.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/cpp/include/IceUtil/Handle.h b/cpp/include/IceUtil/Handle.h
index df233134548..683afe62869 100644
--- a/cpp/include/IceUtil/Handle.h
+++ b/cpp/include/IceUtil/Handle.h
@@ -98,10 +98,10 @@ inline bool operator==(const HandleBase<T>& lhs, const HandleBase<U>& rhs)
{
return *l == *r;
}
- else
- {
- return !l && !r;
- }
+
+ // Note: don't use if { } else { }. This causes lots warnings when
+ // compiling with GCC and optimization enabled. See bug 2330.
+ return !l && !r;
}
template<typename T, typename U>
@@ -119,10 +119,10 @@ inline bool operator<(const HandleBase<T>& lhs, const HandleBase<U>& rhs)
{
return *l < *r;
}
- else
- {
- return !l && r;
- }
+
+ // Note: don't use if { } else { }. This causes lots warnings when
+ // compiling with GCC and optimization enabled. See bug 2330.
+ return !l && r;
}
template<typename T, typename U>