Skip to content

Commit

Permalink
Fixed VS2015 build errors - had to prefix array<> with cli namespace …
Browse files Browse the repository at this point in the history
…as compiler was reporting ambiguous reference (VS2013 was fine with the code)

Basic VS2015 build should now be working
  • Loading branch information
amaitland committed Sep 1, 2015
1 parent 5901cb6 commit 24a423b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 20 deletions.
8 changes: 4 additions & 4 deletions CefSharp.Core/Internals/CefPostDataElementWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,24 +70,24 @@ namespace CefSharp
}
}

virtual property array<Byte>^ Bytes
virtual property cli::array<Byte>^ Bytes
{
array<Byte>^ get()
cli::array<Byte>^ get()
{
auto byteCount = _postDataElement->GetBytesCount();
if (byteCount == 0)
{
return nullptr;
}

auto bytes = gcnew array<Byte>(byteCount);
auto bytes = gcnew cli::array<Byte>(byteCount);
pin_ptr<Byte> src = &bytes[0]; // pin pointer to first element in arr

_postDataElement->GetBytes(byteCount, static_cast<void*>(src));

return bytes;
}
void set(array<Byte>^ val)
void set(cli::array<Byte>^ val)
{
pin_ptr<Byte> src = &val[0];
_postDataElement->SetToBytes(val->Length, static_cast<void*>(src));
Expand Down
18 changes: 9 additions & 9 deletions CefSharp.Core/Internals/CefSslInfoWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
/// </summary>
virtual property array<Byte>^ SerialNumber
virtual property cli::array<Byte>^ SerialNumber
{
array<Byte>^ get()
cli::array<Byte>^ get()
{
auto serialNumber = _sslInfo->GetSerialNumber();
auto byteCount = serialNumber->GetSize();
Expand All @@ -94,7 +94,7 @@ namespace CefSharp
return nullptr;
}

auto bytes = gcnew array<Byte>(byteCount);
auto bytes = gcnew cli::array<Byte>(byteCount);
pin_ptr<Byte> src = &bytes[0]; // pin pointer to first element in arr

serialNumber->GetData(static_cast<void*>(src), byteCount, 0);
Expand Down Expand Up @@ -130,9 +130,9 @@ namespace CefSharp
/// <summary>
/// Returns the DER encoded data for the X.509 certificate.
/// </summary>
virtual property array<Byte>^ DerEncoded
virtual property cli::array<Byte>^ DerEncoded
{
array<Byte>^ get()
cli::array<Byte>^ get()
{
auto serialNumber = _sslInfo->GetDEREncoded();
auto byteCount = serialNumber->GetSize();
Expand All @@ -141,7 +141,7 @@ namespace CefSharp
return nullptr;
}

auto bytes = gcnew array<Byte>(byteCount);
auto bytes = gcnew cli::array<Byte>(byteCount);
pin_ptr<Byte> src = &bytes[0]; // pin pointer to first element in arr

serialNumber->GetData(static_cast<void*>(src), byteCount, 0);
Expand All @@ -153,9 +153,9 @@ namespace CefSharp
/// <summary>
/// Returns the PEM encoded data for the X.509 certificate.
/// </summary>
virtual property array<Byte>^ PemEncoded
virtual property cli::array<Byte>^ PemEncoded
{
array<Byte>^ get()
cli::array<Byte>^ get()
{
auto serialNumber = _sslInfo->GetPEMEncoded();
auto byteCount = serialNumber->GetSize();
Expand All @@ -164,7 +164,7 @@ namespace CefSharp
return nullptr;
}

auto bytes = gcnew array<Byte>(byteCount);
auto bytes = gcnew cli::array<Byte>(byteCount);
pin_ptr<Byte> src = &bytes[0]; // pin pointer to first element in arr

serialNumber->GetData(static_cast<void*>(src), byteCount, 0);
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core/Internals/CookieManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace CefSharp
return _cookieManager->SetStoragePath(StringUtils::ToNative(path), persistSessionCookies, NULL);
}

void CookieManager::SetSupportedSchemes(... array<String^>^ schemes)
void CookieManager::SetSupportedSchemes(... cli::array<String^>^ schemes)
{
ThrowIfDisposed();

Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core/Internals/CookieManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace CefSharp
virtual Task<bool>^ DeleteCookiesAsync(String^ url, String^ name);
virtual Task<bool>^ SetCookieAsync(String^ url, Cookie^ cookie);
virtual bool SetStoragePath(String^ path, bool persistSessionSookies);
virtual void SetSupportedSchemes(... array<String^>^ schemes);
virtual void SetSupportedSchemes(... cli::array<String^>^ schemes);
virtual bool VisitAllCookies(ICookieVisitor^ visitor);
virtual bool VisitUrlCookies(String^ url, bool includeHttpOnly, ICookieVisitor^ visitor);
virtual bool FlushStore(ICompletionHandler^ handler);
Expand Down
4 changes: 2 additions & 2 deletions CefSharp.Core/Internals/JavascriptCallbackProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace CefSharp
{
namespace Internals
{
Task<JavascriptResponse^>^ JavascriptCallbackProxy::ExecuteAsync(array<Object^>^ parameters)
Task<JavascriptResponse^>^ JavascriptCallbackProxy::ExecuteAsync(cli::array<Object^>^ parameters)
{
DisposedGuard();

Expand All @@ -32,7 +32,7 @@ namespace CefSharp
return doneCallback.Value->Task;
}

CefRefPtr<CefProcessMessage> JavascriptCallbackProxy::CreateCallMessage(int64 doneCallbackId, array<Object^>^ parameters)
CefRefPtr<CefProcessMessage> JavascriptCallbackProxy::CreateCallMessage(int64 doneCallbackId, cli::array<Object^>^ parameters)
{
auto result = CefProcessMessage::Create(kJavascriptCallbackRequest);
auto argList = result->GetArgumentList();
Expand Down
4 changes: 2 additions & 2 deletions CefSharp.Core/Internals/JavascriptCallbackProxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace CefSharp
PendingTaskRepository<JavascriptResponse^>^ _pendingTasks;
bool _disposed;

CefRefPtr<CefProcessMessage> CreateCallMessage(int64 doneCallbackId, array<Object^>^ parameters);
CefRefPtr<CefProcessMessage> CreateCallMessage(int64 doneCallbackId, cli::array<Object^>^ parameters);
CefRefPtr<CefProcessMessage> CreateDestroyMessage();
CefSharpBrowserWrapper^ GetBrowser();
void DisposedGuard();
Expand All @@ -50,7 +50,7 @@ namespace CefSharp
_disposed = true;
}

virtual Task<JavascriptResponse^>^ ExecuteAsync(array<Object^>^ parameters);
virtual Task<JavascriptResponse^>^ ExecuteAsync(cli::array<Object^>^ parameters);

virtual property bool IsDisposed
{
Expand Down
2 changes: 1 addition & 1 deletion CefSharp.Core/ResourceHandlerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ namespace CefSharp
}
else
{
array<Byte>^ buffer = gcnew array<Byte>(bytes_to_read);
auto buffer = gcnew cli::array<Byte>(bytes_to_read);
bytes_read = _stream->Read(buffer, 0, bytes_to_read);
pin_ptr<Byte> src = &buffer[0];
memcpy(data_out, static_cast<void*>(src), bytes_read);
Expand Down

0 comments on commit 24a423b

Please sign in to comment.