From f160567e2137835193cb0a196ece03876fef7fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Kemp=C3=A9?= Date: Sat, 25 Aug 2018 15:04:35 +0000 Subject: [PATCH] Introduce optional parameters --- GitDiffMargin/Git/GitDiffParser.cs | 7 +------ GitDiffMargin/Git/HunkRangeInfo.cs | 7 +------ 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/GitDiffMargin/Git/GitDiffParser.cs b/GitDiffMargin/Git/GitDiffParser.cs index cac0f24..26f7493 100644 --- a/GitDiffMargin/Git/GitDiffParser.cs +++ b/GitDiffMargin/Git/GitDiffParser.cs @@ -10,12 +10,7 @@ public class GitDiffParser private readonly string _gitDiff; private readonly bool _suppressRollback; - public GitDiffParser(string gitDiff, int contextLines) - : this(gitDiff, contextLines, false) - { - } - - public GitDiffParser(string gitDiff, int contextLines, bool suppressRollback) + public GitDiffParser(string gitDiff, int contextLines, bool suppressRollback = false) { _gitDiff = gitDiff; _contextLines = contextLines; diff --git a/GitDiffMargin/Git/HunkRangeInfo.cs b/GitDiffMargin/Git/HunkRangeInfo.cs index d3cd4b8..3362fc8 100644 --- a/GitDiffMargin/Git/HunkRangeInfo.cs +++ b/GitDiffMargin/Git/HunkRangeInfo.cs @@ -9,13 +9,8 @@ namespace GitDiffMargin.Git { public class HunkRangeInfo { - public HunkRangeInfo(HunkRange originaleHunkRange, HunkRange newHunkRange, IEnumerable diffLines) - : this(originaleHunkRange, newHunkRange, diffLines, false) - { - } - public HunkRangeInfo(HunkRange originaleHunkRange, HunkRange newHunkRange, IEnumerable diffLines, - bool suppressRollback) + bool suppressRollback = false) { OriginalHunkRange = originaleHunkRange; NewHunkRange = newHunkRange;