From 2a31b8c1bc60107bf2cb2d9cd9cd21fca7a8d289 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Mon, 24 Jan 2022 14:09:09 +0000 Subject: [PATCH] MSVC 2017 build fixes Add missing include, and fix return type of tint::utils::UniqueVector::empy(). Fixed: tint:1395 Change-Id: I413eabb882b39d959dedcc4175cd7f5cc82e6838 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/77840 Auto-Submit: Ben Clayton Kokoro: Kokoro Reviewed-by: Antonio Maiorano Commit-Queue: Antonio Maiorano --- src/reader/wgsl/lexer.cc | 1 + src/utils/unique_vector.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/reader/wgsl/lexer.cc b/src/reader/wgsl/lexer.cc index 31d2546527..9aa3ae688a 100644 --- a/src/reader/wgsl/lexer.cc +++ b/src/reader/wgsl/lexer.cc @@ -14,6 +14,7 @@ #include "src/reader/wgsl/lexer.h" +#include #include #include #include diff --git a/src/utils/unique_vector.h b/src/utils/unique_vector.h index ea29109aea..e56dd990f7 100644 --- a/src/utils/unique_vector.h +++ b/src/utils/unique_vector.h @@ -73,7 +73,7 @@ struct UniqueVector { const T& operator[](size_t i) const { return vector[i]; } /// @returns true if the vector is empty - size_t empty() const { return vector.empty(); } + bool empty() const { return vector.empty(); } /// @returns the number of items in the vector size_t size() const { return vector.size(); }