Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesNK committed Dec 16, 2020
1 parent dc4f291 commit 77d0509
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions csharp/src/Google.Protobuf/WritingPrimitives.cs
Expand Up @@ -50,8 +50,11 @@ namespace Google.Protobuf
[SecuritySafeCritical]
internal static class WritingPrimitives
{
// "Local" copy of Encoding.UTF8, for efficiency. (Yes, it makes a difference.)
internal static readonly Encoding Utf8Encoding = Encoding.UTF8;
#if NET5_0
internal static Encoding Utf8Encoding => Encoding.UTF8; // allows JIT to devirtualize
#else
internal static Encoding Utf8Encoding = Encoding.UTF8; // "Local" copy of Encoding.UTF8, for efficiency. (Yes, it makes a difference.)
#endif

#region Writing of values (not including tags)

Expand Down

0 comments on commit 77d0509

Please sign in to comment.