const is better for this. lol

This commit is contained in:
cinder
2025-01-11 14:54:19 -06:00
parent 8a8655f506
commit db111d00be

View File

@@ -1,6 +1,6 @@
/*
* Copyright (c) 2006-2016, openmetaverse.co
* Copyright (c) 2021-2022, Sjofn LLC.
* Copyright (c) 2021-2025, Sjofn LLC.
* All rights reserved.
*
* - Redistribution and use in source and binary forms, with or without
@@ -39,7 +39,7 @@ namespace OpenMetaverse.StructuredData
/// </summary>
public static partial class OSDParser
{
private static string linden_lab_loves_bad_pi = "<? LLSD/";
private const string LINDEN_LAB_LOVES_BAD_PI = "<? LLSD/";
/// <summary>
/// Deserialize LLSD/XML stream
@@ -49,7 +49,7 @@ namespace OpenMetaverse.StructuredData
public static OSD DeserializeLLSDXml(Stream xmlStream)
{
// XmlReader don't take no shit from nobody. Parse out Linden Lab's bad PI.
bool match = linden_lab_loves_bad_pi.All(t => xmlStream.ReadByte() == t);
bool match = LINDEN_LAB_LOVES_BAD_PI.All(t => xmlStream.ReadByte() == t);
if (match)
{
// read until the linebreak >