diff --git a/src/dawn_native/ObjectContentHasher.h b/src/dawn_native/ObjectContentHasher.h index 2fed270149..88d8a54020 100644 --- a/src/dawn_native/ObjectContentHasher.h +++ b/src/dawn_native/ObjectContentHasher.h @@ -53,13 +53,6 @@ namespace dawn_native { } }; - template <> - struct RecordImpl { - static constexpr void Call(ObjectContentHasher* recorder, const std::string& str) { - recorder->RecordIterable(str); - } - }; - template struct RecordImpl> { static constexpr void Call(ObjectContentHasher* recorder, const std::vector& vec) { @@ -68,7 +61,7 @@ namespace dawn_native { }; template - void RecordIterable(const IteratorT& iterable) { + constexpr void RecordIterable(const IteratorT& iterable) { for (auto it = iterable.begin(); it != iterable.end(); ++it) { Record(*it); } @@ -76,6 +69,14 @@ namespace dawn_native { size_t mContentHash = 0; }; + + template <> + struct ObjectContentHasher::RecordImpl { + static constexpr void Call(ObjectContentHasher* recorder, const std::string& str) { + recorder->RecordIterable(str); + } + }; + } // namespace dawn_native #endif // DAWNNATIVE_OBJECT_CONTENT_HASHER_H_ \ No newline at end of file