From 4a3503a61095bdb74c4247b3a54daef6ca5b8e0c Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Tue, 25 Jan 2022 20:34:10 +0000 Subject: [PATCH] dawn_native: Use 'auto' to handle change of tint type tint::Source::FileContent::lines has changed from a vector of std::string to std::string_view. The dawn usage of the field works with both types without changes, so juse use `auto` to let tint roll. Change-Id: I0d8309a13e94da7e3558bd32d0d98a4f27a1a4bc Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/77943 Reviewed-by: Brandon Jones Commit-Queue: Ben Clayton --- src/dawn_native/CompilationMessages.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dawn_native/CompilationMessages.cpp b/src/dawn_native/CompilationMessages.cpp index 50e19bd33c..aaac193156 100644 --- a/src/dawn_native/CompilationMessages.cpp +++ b/src/dawn_native/CompilationMessages.cpp @@ -68,7 +68,7 @@ namespace dawn::native { uint64_t length = 0; if (lineNum && linePos && diagnostic.source.file_content) { - const std::vector& lines = diagnostic.source.file_content->lines; + const auto& lines = diagnostic.source.file_content->lines; size_t i = 0; // To find the offset of the message position, loop through each of the first lineNum-1 // lines and add it's length (+1 to account for the line break) to the offset.