utils/bench-packets.cc
changeset 1323 08174b13d76f
parent 1322 b6a4885a92df
child 1814 21c9c4dd9768
child 1866 e7dbcc4df546
--- a/utils/bench-packets.cc	Tue Sep 11 08:27:27 2007 +0200
+++ b/utils/bench-packets.cc	Tue Sep 11 10:35:56 2007 +0200
@@ -35,7 +35,7 @@
 
   static uint32_t GetUid (void);
 
-  std::string GetName (void) const;
+  static std::string GetName (void);
   void Print (std::ostream &os) const;
   uint32_t GetSerializedSize (void) const;
   void Serialize (Buffer::Iterator start) const;
@@ -60,18 +60,16 @@
 uint32_t 
 BenchHeader<N>::GetUid (void)
 {
-  std::ostringstream oss;
-  oss << "BenchHeader" << N;
-  static uint32_t uid = AllocateUid<BenchHeader<N> > (oss.str ());
+  static uint32_t uid = AllocateUid<BenchHeader<N> > (GetName ());
   return uid;
 }
 
 template <int N>
 std::string 
-BenchHeader<N>::GetName (void) const
+BenchHeader<N>::GetName (void)
 {
   std::ostringstream oss;
-  oss << N;
+  oss << "BenchHeader" << N;
   return oss.str ();
 }