Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Port https://github.com/dotnet/corert/pull/629 to CoreCLR #2636

Merged
merged 1 commit into from
Jan 13, 2016
Merged

Port https://github.com/dotnet/corert/pull/629 to CoreCLR #2636

merged 1 commit into from
Jan 13, 2016

Conversation

bbowyersmyth
Copy link

fixed (char* chPtr1 = strA)

compiles to

string str = strA;
char* chPtr1 = (char*) str;
if ((IntPtr) chPtr1 != IntPtr.Zero)
    chPtr1 += RuntimeHelpers.OffsetToStringData;

but string already has knowledge of where the offset is. This also brings these fixed statements in line with the rest of the file.

@stephentoub
Copy link
Member

LGTM

jkotas added a commit that referenced this pull request Jan 13, 2016
@jkotas jkotas merged commit 986e347 into dotnet:master Jan 13, 2016
@bbowyersmyth bbowyersmyth deleted the FixedString branch January 14, 2016 06:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants