diff --git a/utils/bench-packets.cc b/utils/bench-packets.cc index 29c1044e4..e16c17b02 100644 --- a/utils/bench-packets.cc +++ b/utils/bench-packets.cc @@ -35,7 +35,7 @@ public: 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 @@ template uint32_t BenchHeader::GetUid (void) { - std::ostringstream oss; - oss << "BenchHeader" << N; - static uint32_t uid = AllocateUid > (oss.str ()); + static uint32_t uid = AllocateUid > (GetName ()); return uid; } template std::string -BenchHeader::GetName (void) const +BenchHeader::GetName (void) { std::ostringstream oss; - oss << N; + oss << "BenchHeader" << N; return oss.str (); }