Index: code/trunk/src/libraries/network/synchronisable/NetworkCallback.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/NetworkCallback.h	(revision 10624)
+++ code/trunk/src/libraries/network/synchronisable/NetworkCallback.h	(revision 11071)
@@ -53,5 +53,5 @@
       NetworkCallback(T* object, void (T::*function) (void)) : object_(object), function_(function) {}
       virtual ~NetworkCallback() {}
-      virtual void call()
+      virtual void call() override
         { (this->object_->*function_)(); }
 
@@ -68,5 +68,5 @@
       NetworkCallbackNotify() {}
       virtual ~NetworkCallbackNotify() {}
-      virtual void call()
+      virtual void call() override
         { (this->object_->*function_)( this->oldValue_ ); }
       void setOldValue(const U& value){ this->oldValue_ = value; }
Index: code/trunk/src/libraries/network/synchronisable/Serialise.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 10624)
+++ code/trunk/src/libraries/network/synchronisable/Serialise.h	(revision 11071)
@@ -90,5 +90,5 @@
     {
 //         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
-        *const_cast<typename Loki::TypeTraits<StrongPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
+        *const_cast<typename Loki::TypeTraits<StrongPtr<T>>::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
         mem += returnSize( variable );
     }
@@ -125,5 +125,5 @@
     {
         //         *const_cast<typename Loki::TypeTraits<T*>::UnqualifiedType*>(&variable) = dynamic_cast<T*>(variable->getSynchronisable( *(uint32_t*)(mem) ));
-        *const_cast<typename Loki::TypeTraits<WeakPtr<T> >::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
+        *const_cast<typename Loki::TypeTraits<WeakPtr<T>>::UnqualifiedType*>(&variable) = orxonox_cast<T*>(T::getSynchronisable(*(uint32_t*)(mem)));
         mem += returnSize( variable );
     }
Index: code/trunk/src/libraries/network/synchronisable/Synchronisable.cc
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 10624)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.cc	(revision 11071)
@@ -88,6 +88,6 @@
     }
     // delete all Synchronisable Variables from syncList_ ( which are also in stringList_ )
-    for(std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin(); it!=syncList_.end(); it++)
-      delete (*it);
+    for(SynchronisableVariableBase* variable : syncList_)
+      delete variable;
     syncList_.clear();
     stringList_.clear();
@@ -105,9 +105,9 @@
   uint32_t Synchronisable::findContextID(Context* context)
   {
-      if (context == NULL)
+      if (context == nullptr)
           return OBJECTID_UNKNOWN;
 
       Synchronisable* synchronisableContext = orxonox_cast<Synchronisable*>(context);
-      if (synchronisableContext != NULL)
+      if (synchronisableContext != nullptr)
           return synchronisableContext->getObjectID();
       else
@@ -140,5 +140,5 @@
     {
       mem += header.getDataSize() + header.getSize();
-      return 0;
+      return nullptr;
     }
 //     assert( !header.isDiffed() );
@@ -156,5 +156,5 @@
     }
     assert(id);
-    Context* context = 0;
+    Context* context = nullptr;
     if (header.getContextID() != OBJECTID_UNKNOWN)
     {
@@ -164,5 +164,5 @@
         mem += header.getDataSize()+SynchronisableHeader::getSize(); //.TODO: this suckz.... remove size from header
         assert(0); // TODO: uncomment this if we have a clean objecthierarchy (with destruction of children of objects) ^^
-        return 0;
+        return nullptr;
       }
       else
@@ -172,5 +172,5 @@
       context = Context::getRootContext();
 
-    assert(getSynchronisable(header.getObjectID())==0);   //make sure no object with this id exists
+    assert(getSynchronisable(header.getObjectID())==nullptr);   //make sure no object with this id exists
     BaseObject *bo = orxonox_cast<BaseObject*>(id->fabricate(context));
     assert(bo);
@@ -226,5 +226,5 @@
       return it1->second;
     // if the objects not in the map it should'nt exist at all anymore
-    return NULL;
+    return nullptr;
   }
 
@@ -266,5 +266,4 @@
     assert(this->classID_==this->getIdentifier()->getNetworkID());
     assert(this->objectID_!=OBJECTID_UNKNOWN);
-    std::vector<SynchronisableVariableBase*>::iterator i;
 
     // start copy header
@@ -276,7 +275,7 @@
 //     orxout(verbose, context::network) << "objectid: " << this->objectID_ << ":";
     // copy to location
-    for(i=syncList_.begin(); i!=syncList_.end(); ++i)
-    {
-      uint32_t varsize = (*i)->getData( mem, mode );
+    for(SynchronisableVariableBase* variable : syncList_)
+    {
+      uint32_t varsize = variable->getData( mem, mode );
 //       orxout(verbose, context::network) << " " << varsize;
       tempsize += varsize;
@@ -348,9 +347,8 @@
       assert( this->getContextID() == syncHeader2.getContextID() );
       mem += SynchronisableHeader::getSize();
-      std::vector<SynchronisableVariableBase *>::iterator i;
-      for(i=syncList_.begin(); i!=syncList_.end(); ++i)
+      for(SynchronisableVariableBase* variable : syncList_)
       {
         assert( mem <= data+syncHeader2.getDataSize()+SynchronisableHeader::getSize() ); // always make sure we don't exceed the datasize in our stream
-        (*i)->putData( mem, mode, forceCallback );
+        variable->putData( mem, mode, forceCallback );
       }
       assert(mem == data+syncHeaderLight.getDataSize()+SynchronisableHeader::getSize() );
@@ -388,8 +386,7 @@
     assert( mode==state_ );
     tsize += this->dataSize_;
-    std::vector<SynchronisableVariableBase*>::iterator i;
-    for(i=stringList_.begin(); i!=stringList_.end(); ++i)
-    {
-      tsize += (*i)->getSize( mode );
+    for(SynchronisableVariableBase* variable : stringList_)
+    {
+      tsize += variable->getSize( mode );
     }
     return tsize;
Index: code/trunk/src/libraries/network/synchronisable/Synchronisable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/Synchronisable.h	(revision 10624)
+++ code/trunk/src/libraries/network/synchronisable/Synchronisable.h	(revision 11071)
@@ -38,4 +38,5 @@
 #include <queue>
 #include <set>
+#include <type_traits>
 
 #include "util/mbool.h"
@@ -171,6 +172,6 @@
   protected:
     Synchronisable(Context* context);
-    template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
-    template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=0, bool bidirectional=false);
+    template <class T> void registerVariable(T& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false);
+    template <class T> void registerVariable(std::set<T>& variable, uint8_t mode=0x1, NetworkCallbackBase *cb=nullptr, bool bidirectional=false);
     template <class T> void unregisterVariable(T& var);
 
@@ -203,14 +204,26 @@
   };
 
-  template <class T> void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-  {
+  namespace detail
+  {
+    template <class T, bool = std::is_enum<T>::value>
+    struct UnderlyingType;
+    template <class T>
+    struct UnderlyingType<T, true> { typedef typename std::underlying_type<T>::type type; };
+    template <class T>
+    struct UnderlyingType<T, false> { typedef T type; };
+  }
+
+  template <class T>
+  void Synchronisable::registerVariable(T& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    typedef typename detail::UnderlyingType<T>::type UnderlyingType;
     if (bidirectional)
     {
-      syncList_.push_back(new SynchronisableVariableBidirectional<T>(variable, mode, cb));
+      syncList_.push_back(new SynchronisableVariableBidirectional<UnderlyingType>(reinterpret_cast<UnderlyingType&>(variable), mode, cb));
       this->dataSize_ += syncList_.back()->getSize(state_);
     }
     else
     {
-      syncList_.push_back(new SynchronisableVariable<T>(variable, mode, cb));
+      syncList_.push_back(new SynchronisableVariable<UnderlyingType>(reinterpret_cast<UnderlyingType&>(variable), mode, cb));
       if ( this->state_ == mode )
         this->dataSize_ += syncList_.back()->getSize(state_);
@@ -218,5 +231,6 @@
   }
   
-  template <class T> void Synchronisable::unregisterVariable(T& variable)
+  template <class T>
+  void Synchronisable::unregisterVariable(T& variable)
   {
     std::vector<SynchronisableVariableBase*>::iterator it = syncList_.begin();
@@ -238,11 +252,13 @@
   }
 
-  template <class T> void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
-  {
+  template <class T>
+  void Synchronisable::registerVariable( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional)
+  {
+    typedef typename detail::UnderlyingType<T>::type UnderlyingType;
     SynchronisableVariableBase* sv;
     if (bidirectional)
-      sv = new SynchronisableVariableBidirectional<std::set<T> >(variable, mode, cb);
+      sv = new SynchronisableVariableBidirectional<std::set<UnderlyingType>>(reinterpret_cast<std::set<UnderlyingType>&>(variable), mode, cb);
     else
-      sv = new SynchronisableVariable<std::set<T> >(variable, mode, cb);
+      sv = new SynchronisableVariable<std::set<UnderlyingType>>(reinterpret_cast<std::set<UnderlyingType>&>(variable), mode, cb);
     syncList_.push_back(sv);
     stringList_.push_back(sv);
@@ -250,5 +266,5 @@
 
   template <> _NetworkExport void Synchronisable::registerVariable( std::string& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
-//   template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T> >( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
+//   template <class T> _NetworkExport void Synchronisable::registerVariable<std::set<T>>( std::set<T>& variable, uint8_t mode, NetworkCallbackBase *cb, bool bidirectional);
   template <> _NetworkExport void Synchronisable::unregisterVariable( std::string& variable );
 
Index: code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h
===================================================================
--- code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 10624)
+++ code/trunk/src/libraries/network/synchronisable/SynchronisableVariable.h	(revision 11071)
@@ -71,12 +71,12 @@
   {
     public:
-      SynchronisableVariable(T& variable, uint8_t syncDirection=VariableDirection::ToClient, NetworkCallbackBase *cb=0);
+      SynchronisableVariable(T& variable, uint8_t syncDirection=VariableDirection::ToClient, NetworkCallbackBase *cb=nullptr);
       virtual ~SynchronisableVariable();
 
-      virtual inline uint8_t getMode(){ return mode_; }
-      virtual inline uint32_t getData(uint8_t*& mem, uint8_t mode);
-      virtual inline void putData(uint8_t*& mem, uint8_t mode, bool forceCallback = false);
-      virtual inline uint32_t getSize(uint8_t mode);
-      virtual inline void* getReference(){ return static_cast<void*>(const_cast<typename Loki::TypeTraits<T>::UnqualifiedType*>(&this->variable_)); }
+      virtual inline uint8_t getMode() override{ return mode_; }
+      virtual inline uint32_t getData(uint8_t*& mem, uint8_t mode) override;
+      virtual inline void putData(uint8_t*& mem, uint8_t mode, bool forceCallback = false) override;
+      virtual inline uint32_t getSize(uint8_t mode) override;
+      virtual inline void* getReference() override{ return static_cast<void*>(const_cast<typename Loki::TypeTraits<T>::UnqualifiedType*>(&this->variable_)); }
     protected:
       T&                       variable_;
@@ -89,5 +89,5 @@
   {
     public:
-      SynchronisableVariableBidirectional(T& variable, uint8_t master=Bidirectionality::ServerMaster, NetworkCallbackBase *cb=0);
+      SynchronisableVariableBidirectional(T& variable, uint8_t master=Bidirectionality::ServerMaster, NetworkCallbackBase *cb=nullptr);
       virtual ~SynchronisableVariableBidirectional();
 
