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 <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Ben Clayton 2022-01-24 14:09:09 +00:00 committed by Tint LUCI CQ
parent ba1a8f8d05
commit 2a31b8c1bc
2 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@
#include "src/reader/wgsl/lexer.h" #include "src/reader/wgsl/lexer.h"
#include <cctype>
#include <cmath> #include <cmath>
#include <cstring> #include <cstring>
#include <limits> #include <limits>

View File

@ -73,7 +73,7 @@ struct UniqueVector {
const T& operator[](size_t i) const { return vector[i]; } const T& operator[](size_t i) const { return vector[i]; }
/// @returns true if the vector is empty /// @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 /// @returns the number of items in the vector
size_t size() const { return vector.size(); } size_t size() const { return vector.size(); }