Skip to content

Commit b468c09

Browse files
committed
Fix test failures
1 parent a9d6e9b commit b468c09

File tree

1 file changed

+4
-4
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost

1 file changed

+4
-4
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/MS/Internal/PtsHost/PtsCache.cs

+4-4
Original file line numberDiff line numberDiff line change
@@ -189,16 +189,16 @@ private PtsHost AcquireContextCore(PtsContext ptsContext, TextFormattingMode tex
189189
}
190190
}
191191

192+
#pragma warning disable IDE0017
192193
// Create new PTS Context, if cannot find free one.
193194
if (index == _contextPool.Count)
194195
{
195196
_contextPool.Add(new ContextDesc());
196197
_contextPool[index].IsOptimalParagraphEnabled = ptsContext.IsOptimalParagraphEnabled;
197-
_contextPool[index].PtsHost = new PtsHost
198-
{
199-
Context = CreatePTSContext(index, textFormattingMode)
200-
};
198+
_contextPool[index].PtsHost = new PtsHost();
199+
_contextPool[index].PtsHost.Context = CreatePTSContext(index, textFormattingMode);
201200
}
201+
#pragma warning restore IDE0017
202202

203203
// Initialize TextFormatter, if optimal paragraph is enabled.
204204
// Optimal paragraph requires new TextFormatter for every PTS Context.

0 commit comments

Comments
 (0)