summaryrefslogtreecommitdiff
path: root/cpp/include/IceUtil/Handle.h
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-08-24 11:28:20 -0400
committerDwayne Boone <dwayne@zeroc.com>2007-08-24 11:28:20 -0400
commit9a07052d6711858507faa27ff736d4520b3163e9 (patch)
tree7fa0a0406be0386a8314b2e8c742f29bf127b70d /cpp/include/IceUtil/Handle.h
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
parentSquashed commit of the following: (diff)
downloadice-9a07052d6711858507faa27ff736d4520b3163e9.tar.bz2
ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.xz
ice-9a07052d6711858507faa27ff736d4520b3163e9.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
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>