diff options
author | marshall-lerner <66791488+marshall-lerner@users.noreply.github.com> | 2022-02-11 18:58:00 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-11 18:58:00 +0300 |
commit | 1ad76f4e546c2d8a557b197fd55020c5609d717b (patch) | |
tree | fa352baa5251e1809a9ee1fb5a131d19901f11e7 /Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs | |
parent | c147b0c20a5b1d4b2e554d9517456ae0f113793b (diff) |
Change FileNameEquals, rather than use PathComparer each time
Diffstat (limited to 'Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs')
-rw-r--r-- | Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs index 58fc1ee..3d64dee 100644 --- a/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs +++ b/Mono.Debugging/Mono.Debugging.Client/BreakpointStore.cs @@ -180,7 +180,7 @@ namespace Mono.Debugging.Client var breakpointsToRemove = new List<BreakEvent> (); foreach (var b in InternalGetBreakpoints ()) { - if (b is Breakpoint bp && PathComparer.Compare (bp.FileName, filename) == 0 + if (b is Breakpoint bp && FileNameEquals(bp.FileName, filename) && (bp.OriginalLine == line || bp.Line == line) && (bp.OriginalColumn == column || bp.Column == column)) { @@ -326,7 +326,7 @@ namespace Mono.Debugging.Client } foreach (var bp in InternalGetBreakpoints ().OfType<Breakpoint> ()) { - if (!(bp is RunToCursorBreakpoint) && PathComparer.Compare(bp.FileName, filename) == 0) + if (!(bp is RunToCursorBreakpoint) && FileNameEquals(bp.FileName, filename)) list.Add (bp); } @@ -347,7 +347,7 @@ namespace Mono.Debugging.Client } foreach (var bp in InternalGetBreakpoints ().OfType<Breakpoint> ()) { - if (!(bp is RunToCursorBreakpoint) && PathComparer.Compare(bp.FileName, filename) == 0 && (bp.OriginalLine == line || bp.Line == line)) + if (!(bp is RunToCursorBreakpoint) && FileNameEquals(bp.FileName, filename) && (bp.OriginalLine == line || bp.Line == line)) list.Add (bp); } @@ -504,13 +504,7 @@ namespace Mono.Debugging.Client if (file2 == null) return false; - if (PathComparer.Compare (file1, file2) == 0) - return true; - - var rfile1 = ResolveFullPath (file1); - var rfile2 = ResolveFullPath (file2); - - return PathComparer.Compare (rfile1, rfile2) == 0; + return PathComparer.Compare (file1, file2) == 0; } internal bool EnableBreakEvent (BreakEvent be, bool enabled) |