diff --git a/src/tint/clone_context.h b/src/tint/clone_context.h index e027565aa1..887d628fe8 100644 --- a/src/tint/clone_context.h +++ b/src/tint/clone_context.h @@ -156,8 +156,8 @@ class CloneContext { /// /// @param v the vector to clone /// @return the cloned vector - template - std::vector Clone(const std::vector& v) { + template + std::vector Clone(const std::vector& v) { std::vector out; out.reserve(v.size()); for (auto& el : v) { @@ -174,9 +174,9 @@ class CloneContext { /// /// @param v the vector to clone /// @return the cloned vector - template - std::vector Clone(const std::vector& v) { - std::vector out; + template + std::vector Clone(const std::vector& v) { + std::vector out; Clone(out, v); return out; } @@ -189,8 +189,8 @@ class CloneContext { /// /// @param from the vector to clone /// @param to the cloned result - template - void Clone(std::vector& to, const std::vector& from) { + template + void Clone(std::vector& to, const std::vector& from) { to.reserve(from.size()); auto list_transform_it = list_transforms_.find(&from); @@ -379,8 +379,8 @@ class CloneContext { /// @param object a pointer to the object in #src that will be omitted from /// the cloned vector. /// @returns this CloneContext so calls can be chained - template - CloneContext& Remove(const std::vector& vector, OBJECT* object) { + template + CloneContext& Remove(const std::vector& vector, OBJECT* object) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, src, object); if (std::find(vector.begin(), vector.end(), object) == vector.end()) { TINT_ICE(Clone, Diagnostics()) @@ -397,8 +397,8 @@ class CloneContext { /// @param object a pointer to the object in #dst that will be inserted at the /// front of the vector /// @returns this CloneContext so calls can be chained - template - CloneContext& InsertFront(const std::vector& vector, OBJECT* object) { + template + CloneContext& InsertFront(const std::vector& vector, OBJECT* object) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, dst, object); auto& transforms = list_transforms_[&vector]; auto& list = transforms.insert_front_; @@ -411,8 +411,8 @@ class CloneContext { /// @param object a pointer to the object in #dst that will be inserted at the /// end of the vector /// @returns this CloneContext so calls can be chained - template - CloneContext& InsertBack(const std::vector& vector, OBJECT* object) { + template + CloneContext& InsertBack(const std::vector& vector, OBJECT* object) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, dst, object); auto& transforms = list_transforms_[&vector]; auto& list = transforms.insert_back_; @@ -426,8 +426,8 @@ class CloneContext { /// @param object a pointer to the object in #dst that will be inserted before /// any occurrence of the clone of `before` /// @returns this CloneContext so calls can be chained - template - CloneContext& InsertBefore(const std::vector& vector, + template + CloneContext& InsertBefore(const std::vector& vector, const BEFORE* before, const OBJECT* object) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, src, before); @@ -450,8 +450,8 @@ class CloneContext { /// @param object a pointer to the object in #dst that will be inserted after /// any occurrence of the clone of `after` /// @returns this CloneContext so calls can be chained - template - CloneContext& InsertAfter(const std::vector& vector, + template + CloneContext& InsertAfter(const std::vector& vector, const AFTER* after, const OBJECT* object) { TINT_ASSERT_PROGRAM_IDS_EQUAL_IF_VALID(Clone, src, after);