Skip to content

Commit

Permalink
Switched from string literals to nameof() use.
Browse files Browse the repository at this point in the history
  • Loading branch information
xvitaly committed Jul 29, 2024
1 parent 0c5f22e commit 23377c8
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 53 deletions.
12 changes: 6 additions & 6 deletions src/corelib/CommonVideo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public int AntiAliasing
res = 4;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasQuality, "_AntiAliasQuality");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasQuality, nameof(_AntiAliasQuality));
break;
}
break;
Expand All @@ -143,12 +143,12 @@ public int AntiAliasing
res = 6;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasQuality, "_AntiAliasQuality");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasQuality, nameof(_AntiAliasQuality));
break;
}
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasing, "_AntiAliasing");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _AntiAliasing, nameof(_AntiAliasing));
break;
}

Expand Down Expand Up @@ -188,7 +188,7 @@ public int AntiAliasing
_AntiAliasQuality = 2;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "AntiAliasing");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(AntiAliasing));
break;
}
}
Expand All @@ -212,7 +212,7 @@ public int MotionBlur
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _MotionBlur, "_MotionBlur");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _MotionBlur, nameof(_MotionBlur));
break;
}

Expand All @@ -230,7 +230,7 @@ public int MotionBlur
_MotionBlur = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "MotionBlur");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(MotionBlur));
break;
}
}
Expand Down
48 changes: 24 additions & 24 deletions src/corelib/Type1Video.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public int DisplayMode
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _DisplayMode, "_DisplayMode");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _DisplayMode, nameof(_DisplayMode));
break;
}

Expand All @@ -106,7 +106,7 @@ public int DisplayMode
_DisplayMode = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "DisplayMode");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(DisplayMode));
break;
}
}
Expand All @@ -133,7 +133,7 @@ public int ModelQuality
res = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ModelDetail, "_ModelDetail");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ModelDetail, nameof(_ModelDetail));
break;
}

Expand All @@ -154,7 +154,7 @@ public int ModelQuality
_ModelDetail = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "ModelQuality");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(ModelQuality));
break;
}
}
Expand Down Expand Up @@ -184,7 +184,7 @@ public int TextureQuality
res = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _TextureDetail, "_TextureDetail");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _TextureDetail, nameof(_TextureDetail));
break;
}

Expand All @@ -208,7 +208,7 @@ public int TextureQuality
_TextureDetail = -1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "TextureQuality");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(TextureQuality));
break;
}
}
Expand All @@ -232,7 +232,7 @@ public int ShaderQuality
res = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ShaderDetail, "_ShaderDetail");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ShaderDetail, nameof(_ShaderDetail));
break;
}

Expand All @@ -250,7 +250,7 @@ public int ShaderQuality
_ShaderDetail = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "ShaderQuality");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(ShaderQuality));
break;
}
}
Expand Down Expand Up @@ -280,12 +280,12 @@ public int ReflectionsQuality
res = 2;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _WaterReflections, "_WaterReflections");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _WaterReflections, nameof(_WaterReflections));
break;
}
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _WaterDetail, "_WaterDetail");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _WaterDetail, nameof(_WaterDetail));
break;
}

Expand All @@ -309,7 +309,7 @@ public int ReflectionsQuality
_WaterReflections = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "ReflectionsQuality");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(ReflectionsQuality));
break;
}
}
Expand All @@ -333,7 +333,7 @@ public override int ShadowQuality
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ShadowQuality, "_ShadowQuality");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ShadowQuality, nameof(_ShadowQuality));
break;
}

Expand All @@ -351,7 +351,7 @@ public override int ShadowQuality
_ShadowQuality = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "ShadowQuality");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(ShadowQuality));
break;
}
}
Expand All @@ -375,7 +375,7 @@ public int ColorCorrection
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ColorCorrection, "_ColorCorrection");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _ColorCorrection, nameof(_ColorCorrection));
break;
}

Expand All @@ -393,7 +393,7 @@ public int ColorCorrection
_ColorCorrection = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "ColorCorrection");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(ColorCorrection));
break;
}
}
Expand All @@ -420,7 +420,7 @@ public int FilteringMode
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _FilteringTrilinear, "_FilteringTrilinear");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _FilteringTrilinear, nameof(_FilteringTrilinear));
break;
}
break;
Expand All @@ -437,7 +437,7 @@ public int FilteringMode
res = 5;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _FilteringMode, "_FilteringMode");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _FilteringMode, nameof(_FilteringMode));
break;
}

Expand Down Expand Up @@ -473,7 +473,7 @@ public int FilteringMode
_FilteringTrilinear = 0;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "FilteringMode");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(FilteringMode));
break;
}
}
Expand All @@ -497,7 +497,7 @@ public override int VSync
res = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _VSync, "_VSync");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _VSync, nameof(_VSync));
break;
}

Expand All @@ -515,7 +515,7 @@ public override int VSync
_VSync = 1;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "VSync");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(VSync));
break;
}
}
Expand Down Expand Up @@ -545,7 +545,7 @@ public int DirectXMode
res = 3;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _DirectXMode, "_DirectXMode");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _DirectXMode, nameof(_DirectXMode));
break;
}

Expand All @@ -569,7 +569,7 @@ public int DirectXMode
_DirectXMode = 95;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "DirectXMode");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(DirectXMode));
break;
}
}
Expand All @@ -596,7 +596,7 @@ public int HDRType
res = 2;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _HDRMode, "_HDRMode");
Logger.Warn(DebugStrings.AppDbgCoreFieldOutOfRange, _HDRMode, nameof(_HDRMode));
break;
}

Expand All @@ -617,7 +617,7 @@ public int HDRType
_HDRMode = 2;
break;
default:
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, "HDRType");
Logger.Warn(DebugStrings.AppDbgCoreSetterOutOfRange, value, nameof(HDRType));
break;
}
}
Expand Down
Loading

0 comments on commit 23377c8

Please sign in to comment.