summaryrefslogtreecommitdiff
path: root/cpp/src/Freeze/MapDb.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/MapDb.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/MapDb.cpp')
-rw-r--r--cpp/src/Freeze/MapDb.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpp/src/Freeze/MapDb.cpp b/cpp/src/Freeze/MapDb.cpp
index 53a64011b9e..1453ab4fcc4 100644
--- a/cpp/src/Freeze/MapDb.cpp
+++ b/cpp/src/Freeze/MapDb.cpp
@@ -228,11 +228,13 @@ Freeze::MapDb::MapDb(const ConnectionIPtr& connection,
throw DatabaseException(__FILE__, __LINE__, message);
}
-#ifndef NDEBUG
+#ifdef NDEBUG
+ _indices.insert(IndexMap::value_type(indexBase->name(), indexI.get()));
+#else
bool inserted =
-#endif
_indices.insert(IndexMap::value_type(indexBase->name(), indexI.get())).second;
assert(inserted);
+#endif
indexBase->_impl = indexI.release();