Fixes to build with MSVC 2019
When building with MSVC (using 'is_clang=false') various errors are
encountered. This fixes:
- multiple tests/end2end/ColorStateTests.cpp(309): error C2039:
'transform': is not a member of 'std'
- dawn_wire/server/Server.h(171): error C2248:
'dawn_wire::server::MapUserdata::MapUserdata': cannot access private
member declared in class 'dawn_wire::server::MapUserdata'
- variants of the above in Server.h for all the other CallbackUserdata
subclasses
Bug: dawn:602
Change-Id: I01b1db3fbf67ae170b21a7d890af6162b82a1725
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37420
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
diff --git a/src/dawn_wire/server/Server.h b/src/dawn_wire/server/Server.h
index 7b673d8..d503e81 100644
--- a/src/dawn_wire/server/Server.h
+++ b/src/dawn_wire/server/Server.h
@@ -53,8 +53,6 @@
Server* const server;
std::weak_ptr<bool> const serverIsAlive;
- private:
- friend class Server;
CallbackUserdata() = delete;
CallbackUserdata(Server* server, const std::shared_ptr<bool>& serverIsAlive)
: server(server), serverIsAlive(serverIsAlive) {
diff --git a/src/tests/end2end/ColorStateTests.cpp b/src/tests/end2end/ColorStateTests.cpp
index 0327565..973a923 100644
--- a/src/tests/end2end/ColorStateTests.cpp
+++ b/src/tests/end2end/ColorStateTests.cpp
@@ -12,6 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
+#include <algorithm>
#include <array>
#include <cmath>