[MOAB-dev] r1326 - MOAB/trunk

kraftche at mcs.anl.gov kraftche at mcs.anl.gov
Tue Oct 23 15:40:36 CDT 2007


Author: kraftche
Date: 2007-10-23 15:40:36 -0500 (Tue, 23 Oct 2007)
New Revision: 1326

Modified:
   MOAB/trunk/WriteVtk.cpp
Log:
don't use template specialization because ms visual c++ is broken

Modified: MOAB/trunk/WriteVtk.cpp
===================================================================
--- MOAB/trunk/WriteVtk.cpp	2007-10-23 19:37:46 UTC (rev 1325)
+++ MOAB/trunk/WriteVtk.cpp	2007-10-23 20:40:36 UTC (rev 1326)
@@ -406,29 +406,32 @@
   {
     for (unsigned j = 0; j < vals_per_tag; ++j, ++d)
     {
-      stream << *d << ' ';
+      if (sizeof(T) == 1) 
+        stream << (unsigned int)*d << ' ';
+      else
+        stream << *d << ' ';
     }
     stream << std::endl;
   }
 }
 
-template <>
-void WriteVtk::write_data<unsigned char>( std::ostream& stream, 
-                                          const std::vector<unsigned char>& data,
-                                          unsigned vals_per_tag )
-{
-  std::vector<unsigned char>::const_iterator d = data.begin();
-  const unsigned long n = data.size() / vals_per_tag;
-  
-  for (unsigned long i = 0; i < n; ++i)
-  {
-    for (unsigned j = 0; j < vals_per_tag; ++j, ++d)
-    {
-      stream << (unsigned int)*d << ' ';
-    }
-    stream << std::endl;
-  }
-}
+//template <>
+//void WriteVtk::write_data<unsigned char>( std::ostream& stream, 
+//                                          const std::vector<unsigned char>& data,
+//                                          unsigned vals_per_tag )
+//{
+//  std::vector<unsigned char>::const_iterator d = data.begin();
+//  const unsigned long n = data.size() / vals_per_tag;
+//  
+//  for (unsigned long i = 0; i < n; ++i)
+//  {
+//    for (unsigned j = 0; j < vals_per_tag; ++j, ++d)
+//    {
+//      stream << (unsigned int)*d << ' ';
+//    }
+//    stream << std::endl;
+//  }
+//}
 
 
 template <typename T>




More information about the moab-dev mailing list