summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/MapI.cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2012-12-26 16:13:08 -0500
committerBernard Normier <bernard@zeroc.com>2012-12-26 16:13:08 -0500
commit9949c599a73b6392e8162990fdfa207ac9461e65 (patch)
tree1bd82a44b3babd30fb817523af0ad19156744847 /cpp/src/Freeze/MapI.cpp
parentFixed GCC warnings; added -Werror to GCC builds (diff)
downloadice-9949c599a73b6392e8162990fdfa207ac9461e65.tar.bz2
ice-9949c599a73b6392e8162990fdfa207ac9461e65.tar.xz
ice-9949c599a73b6392e8162990fdfa207ac9461e65.zip
Fixed warnings on OSX and added -Werror to build
Diffstat (limited to 'cpp/src/Freeze/MapI.cpp')
-rw-r--r--cpp/src/Freeze/MapI.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/cpp/src/Freeze/MapI.cpp b/cpp/src/Freeze/MapI.cpp
index 603d9ab35c6..1e4138e9e9c 100644
--- a/cpp/src/Freeze/MapI.cpp
+++ b/cpp/src/Freeze/MapI.cpp
@@ -1030,11 +1030,14 @@ Freeze::MapHelperI::MapHelperI(const ConnectionIPtr& connection,
assert(indexBase->_communicator == _connection->communicator());
assert(indexBase->_map == 0);
-#ifndef NDEBUG
+#ifdef NDEBUG
+ _indices.insert(IndexMap::value_type(indexBase->name(), indexBase));
+#else
bool inserted =
-#endif
_indices.insert(IndexMap::value_type(indexBase->name(), indexBase)).second;
assert(inserted);
+#endif
+
indexBase->_map = this;
}