Added SENF_NO_DEBUG symbol and removed dependency on NDEBUG
[senf.git] / Packets / PacketRegistry.ct
index a0bf61c..ab97835 100644 (file)
@@ -1,9 +1,9 @@
 // $Id$
 //
 // Copyright (C) 2006
-// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS)
-// Kompetenzzentrum fuer Satelitenkommunikation (SatCom)
-//     Stefan Bund <stefan.bund@fokus.fraunhofer.de>
+// Fraunhofer Institute for Open Communication Systems (FOKUS) 
+// Competence Center NETwork research (NET), St. Augustin, GERMANY 
+//     Stefan Bund <g0dil@berlios.de>
 //
 // This program is free software; you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by
@@ -26,6 +26,7 @@
 #include "PacketRegistry.ih"
 
 // Custom includes
+#include "../Utils/senfassert.hh"
 #include <iostream>
 
 #define prefix_
@@ -42,7 +43,7 @@ template <class KeyType>
 template <class PacketType>
 prefix_ void senf::detail::PacketRegistryImpl<KeyType>::registerPacket(key_t key)
 {
-#ifdef NDEBUG
+#ifdef SENF_NO_DEBUG
     registry_.insert(std::make_pair(key, Entry_ptr(new detail::PkReg_EntryImpl<PacketType>())));
     reverseRegistry_.insert(std::make_pair(senf::typeIdValue<PacketType>(), key));
 #else
@@ -50,12 +51,12 @@ prefix_ void senf::detail::PacketRegistryImpl<KeyType>::registerPacket(key_t key
         registry_.insert(
             std::make_pair(key, Entry_ptr(new detail::PkReg_EntryImpl<PacketType>()))).second);
     // If this assertion fails, a Packet was registered with an already known key
-    BOOST_ASSERT( isUnique );
+    SENF_ASSERT( isUnique );
     bool isNew (
         reverseRegistry_.insert(
             std::make_pair(senf::typeIdValue<PacketType>(), key)).second);
     // If this assertion fails, the same Packet was registered with two different keys
-    BOOST_ASSERT( isNew );
+    SENF_ASSERT( isNew );
 #endif
 }