← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~paul-lucas/zorba/bug-980463 into lp:zorba

 

Paul J. Lucas has proposed merging lp:~paul-lucas/zorba/bug-980463 into lp:zorba.

Requested reviews:
  Paul J. Lucas (paul-lucas)
  Matthias Brantner (matthias-brantner)
  Markos Zaharioudakis (markos-za)
  Daniel Turcanu (danielturcanu)
Related bugs:
  Bug #980463 in Zorba: "Using type_info::name() wrong"
  https://bugs.launchpad.net/zorba/+bug/980463

For more details, see:
https://code.launchpad.net/~paul-lucas/zorba/bug-980463/+merge/101994

Now comparing name() to name().
-- 
https://code.launchpad.net/~paul-lucas/zorba/bug-980463/+merge/101994
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/zorbaserialization/class_serializer.h'
--- src/zorbaserialization/class_serializer.h	2012-04-13 23:13:45 +0000
+++ src/zorbaserialization/class_serializer.h	2012-04-14 00:34:20 +0000
@@ -142,18 +142,16 @@
   class_name::serialize(ar);                                              \
 }
 
-
 #ifndef NDEBUG
 #define CHECK_CLASS_NAME(class_name)\
-if (ar.is_serializing_out() && !ar.is_serialize_base_class())   \
-{                                                               \
-  assert(strstr(typeid(*this).name(), #class_name));            \
+if (ar.is_serializing_out() && !ar.is_serialize_base_class())             \
+{                                                                         \
+  assert(::strcmp(typeid(*this).name(), typeid(class_name).name()) == 0); \
 }
 #else
 #define CHECK_CLASS_NAME(class_name)
 #endif
 
-
 /*******************************************************************************
   Every serializable class C has a nested member class D that is a subclass of
   ClassDeserializer. Furthermore, every serializable class has a static data
@@ -374,8 +372,6 @@
 {                                                                                \
 }
 
-
-
 } // namespace serialization
 } // namespace zorba
 


Follow ups