From 63303095529c73d853a49f963edfc6a3965b12d1 Mon Sep 17 00:00:00 2001 From: morkt Date: Tue, 29 Jul 2014 11:48:43 +0400 Subject: [PATCH] (Encodings.WithFatalFallback): turned into Encoding extension method. --- GameRes/ArcView.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GameRes/ArcView.cs b/GameRes/ArcView.cs index d3adf700..26f4dfb7 100644 --- a/GameRes/ArcView.cs +++ b/GameRes/ArcView.cs @@ -35,11 +35,11 @@ namespace GameRes { public static readonly Encoding cp932 = Encoding.GetEncoding (932); - public static Encoding WithFatalFallback (Encoding enc) + public static Encoding WithFatalFallback (this Encoding enc) { - enc = enc.Clone() as Encoding; - enc.EncoderFallback = EncoderFallback.ExceptionFallback; - return enc; + var encoding = enc.Clone() as Encoding; + encoding.EncoderFallback = EncoderFallback.ExceptionFallback; + return encoding; } }