Fix crash issue when users specify /GR- in VC's compilation flag.
git-svn-id: http://sfntly.googlecode.com/svn/trunk/cpp/src@25 672e30a5-4c29-85ac-ac6d-611c735e0a51
diff --git a/sfntly/port/type.h b/sfntly/port/type.h
index bb51993..4691a82 100644
--- a/sfntly/port/type.h
+++ b/sfntly/port/type.h
@@ -81,10 +81,10 @@
#pragma warning(pop)
#endif
-// The following code is the only place for RTTI. It is done so to allow VC++
-// to perform additional type checking in DEBUG builds.
-#if defined (_MSC_VER) && !defined(NDEBUG)
- assert(f == NULL || dynamic_cast<To>(f) != NULL); // RTTI: debug mode only!
+// The following code is the only place for RTTI. It is done so to allow
+// additional type checking when SFNTLY_TYPE_VERIFICATION is defined.
+#if defined (SFNTLY_TYPE_VERIFICATION)
+ assert(f == NULL || dynamic_cast<To>(f) != NULL);
#endif
return static_cast<To>(f);
}