chore: clean up file-scoped namespace fallout

This commit is contained in:
goat 2022-10-29 15:54:24 +02:00
parent b4a89020e0
commit 09c4828a9e
No known key found for this signature in database
GPG key ID: 49E2AA8C6A76498B
7 changed files with 16 additions and 16 deletions

View file

@ -66,7 +66,7 @@ public sealed class DataManager : IDisposable, IServiceType
LoadMultithreaded = true,
CacheFileResources = true,
#if DEBUG
PanicOnSheetChecksumMismatch = true,
PanicOnSheetChecksumMismatch = true,
#else
PanicOnSheetChecksumMismatch = false,
#endif

View file

@ -84,9 +84,9 @@ public sealed class EntryPoint
internal static void InitLogging(string baseDirectory, bool logConsole, bool logSynchronously)
{
#if DEBUG
var logPath = Path.Combine(baseDirectory, "dalamud.log");
var oldPath = Path.Combine(baseDirectory, "dalamud.old.log");
var oldPathOld = Path.Combine(baseDirectory, "dalamud.log.old");
var logPath = Path.Combine(baseDirectory, "dalamud.log");
var oldPath = Path.Combine(baseDirectory, "dalamud.old.log");
var oldPathOld = Path.Combine(baseDirectory, "dalamud.log.old");
#else
var logPath = Path.Combine(baseDirectory, "..", "..", "..", "dalamud.log");
var oldPath = Path.Combine(baseDirectory, "..", "..", "..", "dalamud.old.log");

View file

@ -63,7 +63,7 @@ internal class DalamudInterface : IDisposable, IServiceType
private readonly TextureWrap tsmLogoTexture;
#if DEBUG
private bool isImGuiDrawDevMenu = true;
private bool isImGuiDrawDevMenu = true;
#else
private bool isImGuiDrawDevMenu = false;
#endif

View file

@ -985,7 +985,7 @@ internal class InterfaceManager : IDisposable, IServiceType
private IntPtr ResizeBuffersDetour(IntPtr swapChain, uint bufferCount, uint width, uint height, uint newFormat, uint swapChainFlags)
{
#if DEBUG
Log.Verbose($"Calling resizebuffers swap@{swapChain.ToInt64():X}{bufferCount} {width} {height} {newFormat} {swapChainFlags}");
Log.Verbose($"Calling resizebuffers swap@{swapChain.ToInt64():X}{bufferCount} {width} {height} {newFormat} {swapChainFlags}");
#endif
this.ResizeBuffers?.InvokeSafely();

View file

@ -759,7 +759,7 @@ internal class DataWindow : Window
var condition = Service<Condition>.Get();
#if DEBUG
ImGui.Text($"ptr: 0x{condition.Address.ToInt64():X}");
ImGui.Text($"ptr: 0x{condition.Address.ToInt64():X}");
#endif
ImGui.Text("Current Conditions:");
@ -1310,11 +1310,11 @@ internal class DataWindow : Window
ImGui.Text($"GamepadInput 0x{gamepadState.GamepadInputAddress.ToInt64():X}");
#if DEBUG
if (ImGui.IsItemHovered())
ImGui.SetMouseCursor(ImGuiMouseCursor.Hand);
if (ImGui.IsItemHovered())
ImGui.SetMouseCursor(ImGuiMouseCursor.Hand);
if (ImGui.IsItemClicked())
ImGui.SetClipboardText($"0x{gamepadState.GamepadInputAddress.ToInt64():X}");
if (ImGui.IsItemClicked())
ImGui.SetClipboardText($"0x{gamepadState.GamepadInputAddress.ToInt64():X}");
#endif
DrawHelper(

View file

@ -2656,16 +2656,16 @@ internal class PluginInstallerWindow : Window, IDisposable
{
Log.Error(ex, "Plugin installer threw an error");
#if DEBUG
if (!string.IsNullOrEmpty(ex.Message))
errorModalMessage += $"\n\n{ex.Message}";
if (!string.IsNullOrEmpty(ex.Message))
errorModalMessage += $"\n\n{ex.Message}";
#endif
}
else
{
Log.Error(ex, "Plugin installer threw an unexpected error");
#if DEBUG
if (!string.IsNullOrEmpty(ex.Message))
errorModalMessage += $"\n\n{ex.Message}";
if (!string.IsNullOrEmpty(ex.Message))
errorModalMessage += $"\n\n{ex.Message}";
#endif
}
}

View file

@ -197,7 +197,7 @@ public sealed class UiBuilder : IDisposable
/// Gets or sets a value indicating whether statistics about UI draw time should be collected.
/// </summary>
#if DEBUG
internal static bool DoStats { get; set; } = true;
internal static bool DoStats { get; set; } = true;
#else
internal static bool DoStats { get; set; } = false;
#endif