Commit 071fc3f9 by Luc Ferron Committed by Commit Bot

Fix build on Windows using Visual Studio

This is a follow-up of this change: https://chromium-review.googlesource.com/c/angle/angle/+/1092101 Just to fix a warning that prevents building in Visual Studio successfully. Bug: angleproject:2306 Change-Id: Ib87d5cb349019fb6b2d7f75b46552146d41787de Reviewed-on: https://chromium-review.googlesource.com/1095480Reviewed-by: 's avatarLingfeng Yang <lfy@google.com> Commit-Queue: Luc Ferron <lucferron@chromium.org>
parent f15f886c
...@@ -42,13 +42,13 @@ class ANGLE_EXPORT RNG ...@@ -42,13 +42,13 @@ class ANGLE_EXPORT RNG
template <class T> template <class T>
T &randomSelect(std::vector<T> &elements) T &randomSelect(std::vector<T> &elements)
{ {
return elements[randomIntBetween(0, elements.size() - 1)]; return elements[randomIntBetween(0, static_cast<int>(elements.size()) - 1)];
} }
template <class T> template <class T>
const T &randomSelect(const std::vector<T> &elements) const T &randomSelect(const std::vector<T> &elements)
{ {
return elements.at(randomIntBetween(0, elements.size() - 1)); return elements.at(randomIntBetween(0, static_cast<int>(elements.size()) - 1));
} }
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment