Skip to content

Commit 90aa454

Browse files
authored
style(clang-tidy): fix modernize-use-emplace checks (#1809)
Signed-off-by: Balakrishna Avulapati <ba@bavulapati.com>
1 parent 8ce5f85 commit 90aa454

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/core/jsonpointer/position.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ auto PointerPositionTracker::operator()(const JSON::ParsePhase phase,
1414
const std::uint64_t column,
1515
const JSON &value) -> void {
1616
if (phase == JSON::ParsePhase::Pre) {
17-
this->stack.push({line, column});
17+
this->stack.emplace(line, column);
1818
if (value.is_string()) {
1919
this->current.push_back(value.to_string());
2020
} else if (value.is_integer()) {

src/core/jsonschema/frame.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,15 @@ auto find_every_base(
141141
for (const auto &subpointer : sourcemeta::core::SubPointerWalker{pointer}) {
142142
if (bases.contains(subpointer)) {
143143
for (const auto &base : bases.at(subpointer)) {
144-
result.push_back({base, subpointer});
144+
result.emplace_back(base, subpointer);
145145
}
146146
}
147147
}
148148

149149
if (result.empty() ||
150150
// This means the top-level schema is anonymous
151151
result.back().second != sourcemeta::core::empty_pointer) {
152-
result.push_back({"", sourcemeta::core::empty_pointer});
152+
result.emplace_back("", sourcemeta::core::empty_pointer);
153153
}
154154

155155
return result;

0 commit comments

Comments
 (0)