statistics.cc (10491:452c860fd0ee) statistics.cc (11320:42ecb523c64a)
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 164 unchanged lines hidden (view full) ---

173 if (!validateStatName(name))
174 panic("invalid stat name '%s'", name);
175
176 pair<NameMapType::iterator, bool> p =
177 nameMap().insert(make_pair(name, this));
178
179 Info *other = p.first->second;
180 bool result = p.second;
1/*
2 * Copyright (c) 2003-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 164 unchanged lines hidden (view full) ---

173 if (!validateStatName(name))
174 panic("invalid stat name '%s'", name);
175
176 pair<NameMapType::iterator, bool> p =
177 nameMap().insert(make_pair(name, this));
178
179 Info *other = p.first->second;
180 bool result = p.second;
181
181
182 if (!result) {
183 // using other->name instead of just name to avoid a compiler
184 // warning. They should be the same.
185 panic("same statistic name used twice! name=%s\n", other->name);
186 }
187
188 this->name = name;
189}

--- 354 unchanged lines hidden ---
182 if (!result) {
183 // using other->name instead of just name to avoid a compiler
184 // warning. They should be the same.
185 panic("same statistic name used twice! name=%s\n", other->name);
186 }
187
188 this->name = name;
189}

--- 354 unchanged lines hidden ---