Fix clang-tidy modernize-use-emplace warnings in headers

This commit is contained in:
Tim Wojtulewicz 2025-06-10 09:57:10 -07:00
parent fb55c8856e
commit cb78d2202f
4 changed files with 5 additions and 7 deletions

View file

@ -165,12 +165,10 @@ public:
// stack of location so that the most recent is always the one that
// will be assumed to be the current one. The pointer must remain
// valid until the location is popped.
void PushLocation(const detail::Location* location) {
locations.push_back(std::pair<const detail::Location*, const detail::Location*>(location, 0));
}
void PushLocation(const detail::Location* location) { locations.emplace_back(location, nullptr); }
void PushLocation(const detail::Location* loc1, const detail::Location* loc2) {
locations.push_back(std::pair<const detail::Location*, const detail::Location*>(loc1, loc2));
locations.emplace_back(loc1, loc2);
}
// Removes the top-most location information from stack.