From 24a423bfc7216200099c9c57f005acd43a6ef68d Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 1 Sep 2015 22:04:33 +1000 Subject: [PATCH] Fixed VS2015 build errors - had to prefix array<> with cli namespace as compiler was reporting ambiguous reference (VS2013 was fine with the code) Basic VS2015 build should now be working --- .../Internals/CefPostDataElementWrapper.h | 8 ++++---- CefSharp.Core/Internals/CefSslInfoWrapper.h | 18 +++++++++--------- CefSharp.Core/Internals/CookieManager.cpp | 2 +- CefSharp.Core/Internals/CookieManager.h | 2 +- .../Internals/JavascriptCallbackProxy.cpp | 4 ++-- .../Internals/JavascriptCallbackProxy.h | 4 ++-- CefSharp.Core/ResourceHandlerWrapper.cpp | 2 +- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/CefSharp.Core/Internals/CefPostDataElementWrapper.h b/CefSharp.Core/Internals/CefPostDataElementWrapper.h index 55bc7e18b2..5385a1cc37 100644 --- a/CefSharp.Core/Internals/CefPostDataElementWrapper.h +++ b/CefSharp.Core/Internals/CefPostDataElementWrapper.h @@ -70,9 +70,9 @@ namespace CefSharp } } - virtual property array^ Bytes + virtual property cli::array^ Bytes { - array^ get() + cli::array^ get() { auto byteCount = _postDataElement->GetBytesCount(); if (byteCount == 0) @@ -80,14 +80,14 @@ namespace CefSharp return nullptr; } - auto bytes = gcnew array(byteCount); + auto bytes = gcnew cli::array(byteCount); pin_ptr src = &bytes[0]; // pin pointer to first element in arr _postDataElement->GetBytes(byteCount, static_cast(src)); return bytes; } - void set(array^ val) + void set(cli::array^ val) { pin_ptr src = &val[0]; _postDataElement->SetToBytes(val->Length, static_cast(src)); diff --git a/CefSharp.Core/Internals/CefSslInfoWrapper.h b/CefSharp.Core/Internals/CefSslInfoWrapper.h index 518ebe0fe7..8e7ab33086 100644 --- a/CefSharp.Core/Internals/CefSslInfoWrapper.h +++ b/CefSharp.Core/Internals/CefSslInfoWrapper.h @@ -83,9 +83,9 @@ namespace CefSharp /// Returns the DER encoded serial number for the X.509 certificate. The value /// possibly includes a leading 00 byte. /// - virtual property array^ SerialNumber + virtual property cli::array^ SerialNumber { - array^ get() + cli::array^ get() { auto serialNumber = _sslInfo->GetSerialNumber(); auto byteCount = serialNumber->GetSize(); @@ -94,7 +94,7 @@ namespace CefSharp return nullptr; } - auto bytes = gcnew array(byteCount); + auto bytes = gcnew cli::array(byteCount); pin_ptr src = &bytes[0]; // pin pointer to first element in arr serialNumber->GetData(static_cast(src), byteCount, 0); @@ -130,9 +130,9 @@ namespace CefSharp /// /// Returns the DER encoded data for the X.509 certificate. /// - virtual property array^ DerEncoded + virtual property cli::array^ DerEncoded { - array^ get() + cli::array^ get() { auto serialNumber = _sslInfo->GetDEREncoded(); auto byteCount = serialNumber->GetSize(); @@ -141,7 +141,7 @@ namespace CefSharp return nullptr; } - auto bytes = gcnew array(byteCount); + auto bytes = gcnew cli::array(byteCount); pin_ptr src = &bytes[0]; // pin pointer to first element in arr serialNumber->GetData(static_cast(src), byteCount, 0); @@ -153,9 +153,9 @@ namespace CefSharp /// /// Returns the PEM encoded data for the X.509 certificate. /// - virtual property array^ PemEncoded + virtual property cli::array^ PemEncoded { - array^ get() + cli::array^ get() { auto serialNumber = _sslInfo->GetPEMEncoded(); auto byteCount = serialNumber->GetSize(); @@ -164,7 +164,7 @@ namespace CefSharp return nullptr; } - auto bytes = gcnew array(byteCount); + auto bytes = gcnew cli::array(byteCount); pin_ptr src = &bytes[0]; // pin pointer to first element in arr serialNumber->GetData(static_cast(src), byteCount, 0); diff --git a/CefSharp.Core/Internals/CookieManager.cpp b/CefSharp.Core/Internals/CookieManager.cpp index c47651a501..52f4344066 100644 --- a/CefSharp.Core/Internals/CookieManager.cpp +++ b/CefSharp.Core/Internals/CookieManager.cpp @@ -56,7 +56,7 @@ namespace CefSharp return _cookieManager->SetStoragePath(StringUtils::ToNative(path), persistSessionCookies, NULL); } - void CookieManager::SetSupportedSchemes(... array^ schemes) + void CookieManager::SetSupportedSchemes(... cli::array^ schemes) { ThrowIfDisposed(); diff --git a/CefSharp.Core/Internals/CookieManager.h b/CefSharp.Core/Internals/CookieManager.h index d9a328ee38..369c88d1e2 100644 --- a/CefSharp.Core/Internals/CookieManager.h +++ b/CefSharp.Core/Internals/CookieManager.h @@ -39,7 +39,7 @@ namespace CefSharp virtual Task^ DeleteCookiesAsync(String^ url, String^ name); virtual Task^ SetCookieAsync(String^ url, Cookie^ cookie); virtual bool SetStoragePath(String^ path, bool persistSessionSookies); - virtual void SetSupportedSchemes(... array^ schemes); + virtual void SetSupportedSchemes(... cli::array^ schemes); virtual bool VisitAllCookies(ICookieVisitor^ visitor); virtual bool VisitUrlCookies(String^ url, bool includeHttpOnly, ICookieVisitor^ visitor); virtual bool FlushStore(ICompletionHandler^ handler); diff --git a/CefSharp.Core/Internals/JavascriptCallbackProxy.cpp b/CefSharp.Core/Internals/JavascriptCallbackProxy.cpp index d34608fa63..36e3c30b68 100644 --- a/CefSharp.Core/Internals/JavascriptCallbackProxy.cpp +++ b/CefSharp.Core/Internals/JavascriptCallbackProxy.cpp @@ -15,7 +15,7 @@ namespace CefSharp { namespace Internals { - Task^ JavascriptCallbackProxy::ExecuteAsync(array^ parameters) + Task^ JavascriptCallbackProxy::ExecuteAsync(cli::array^ parameters) { DisposedGuard(); @@ -32,7 +32,7 @@ namespace CefSharp return doneCallback.Value->Task; } - CefRefPtr JavascriptCallbackProxy::CreateCallMessage(int64 doneCallbackId, array^ parameters) + CefRefPtr JavascriptCallbackProxy::CreateCallMessage(int64 doneCallbackId, cli::array^ parameters) { auto result = CefProcessMessage::Create(kJavascriptCallbackRequest); auto argList = result->GetArgumentList(); diff --git a/CefSharp.Core/Internals/JavascriptCallbackProxy.h b/CefSharp.Core/Internals/JavascriptCallbackProxy.h index 1abb0947c0..08e54df388 100644 --- a/CefSharp.Core/Internals/JavascriptCallbackProxy.h +++ b/CefSharp.Core/Internals/JavascriptCallbackProxy.h @@ -24,7 +24,7 @@ namespace CefSharp PendingTaskRepository^ _pendingTasks; bool _disposed; - CefRefPtr CreateCallMessage(int64 doneCallbackId, array^ parameters); + CefRefPtr CreateCallMessage(int64 doneCallbackId, cli::array^ parameters); CefRefPtr CreateDestroyMessage(); CefSharpBrowserWrapper^ GetBrowser(); void DisposedGuard(); @@ -50,7 +50,7 @@ namespace CefSharp _disposed = true; } - virtual Task^ ExecuteAsync(array^ parameters); + virtual Task^ ExecuteAsync(cli::array^ parameters); virtual property bool IsDisposed { diff --git a/CefSharp.Core/ResourceHandlerWrapper.cpp b/CefSharp.Core/ResourceHandlerWrapper.cpp index 8410259232..076d434500 100644 --- a/CefSharp.Core/ResourceHandlerWrapper.cpp +++ b/CefSharp.Core/ResourceHandlerWrapper.cpp @@ -50,7 +50,7 @@ namespace CefSharp } else { - array^ buffer = gcnew array(bytes_to_read); + auto buffer = gcnew cli::array(bytes_to_read); bytes_read = _stream->Read(buffer, 0, bytes_to_read); pin_ptr src = &buffer[0]; memcpy(data_out, static_cast(src), bytes_read);