diff --git a/projects/GKCore/GDModel/GDMList.cs b/projects/GKCore/GDModel/GDMList.cs index 46bd4e358..4fea4c65a 100644 --- a/projects/GKCore/GDModel/GDMList.cs +++ b/projects/GKCore/GDModel/GDMList.cs @@ -95,7 +95,7 @@ public int Count public T this[int index] { get { - return (fDataList == null) ? default(T) : fDataList[index]; + return (fDataList == null) ? default : fDataList[index]; } } @@ -204,7 +204,7 @@ public void Exchange(int index1, int index2) public T Extract(int index) { - if (fDataList == null) return default(T); + if (fDataList == null) return default; T result = fDataList[index]; fDataList.RemoveAt(index); @@ -213,14 +213,14 @@ public T Extract(int index) public T Extract(T item) { - if (fDataList == null) return default(T); + if (fDataList == null) return default; int index = fDataList.IndexOf(item); if (index >= 0) { fDataList.RemoveAt(index); return item; } else { - return default(T); + return default; } } diff --git a/projects/GKCore/GDModel/GDMLocationRecord.cs b/projects/GKCore/GDModel/GDMLocationRecord.cs index 84bc738f8..340c1a244 100644 --- a/projects/GKCore/GDModel/GDMLocationRecord.cs +++ b/projects/GKCore/GDModel/GDMLocationRecord.cs @@ -242,7 +242,7 @@ public GDMList GetFullNames(GDMTree tree, ATDEnumeration atdEnu } } - if (topBuffer.Count == 0 || !locDate.IsEmpty()) { + if (topBuffer.Count == 0 || (locDate != null && !locDate.IsEmpty())) { result.Add(new GDMLocationName(nVal, locDate)); } } diff --git a/projects/GKCore/GKCore/GKData.cs b/projects/GKCore/GKCore/GKData.cs index 3507eb0ed..1a2146fc2 100644 --- a/projects/GKCore/GKCore/GKData.cs +++ b/projects/GKCore/GKCore/GKData.cs @@ -390,12 +390,12 @@ static GKData() new PredefinedEvent(LSID.PersonalProperty, GEDCOMTagName.PROP, EventKind.ekFact, EventTarget.etIndividual), new PredefinedEvent(LSID.NobilityTitle, GEDCOMTagName.TITL, EventKind.ekFact, EventTarget.etIndividual), - new PredefinedEvent(LSID.Travel, GEDCOMTagName._TRAVEL, EventKind.ekFact, EventTarget.etIndividual), + new PredefinedEvent(LSID.Travel, GEDCOMTagName._TRAVEL, EventKind.ekFact, EventTarget.etIndividual, true), new PredefinedEvent(LSID.Hobby, GEDCOMTagName._HOBBY, EventKind.ekFact, EventTarget.etIndividual), new PredefinedEvent(LSID.Award, GEDCOMTagName._AWARD, EventKind.ekFact, EventTarget.etIndividual), new PredefinedEvent(LSID.Mili, GEDCOMTagName._MILI, EventKind.ekFact, EventTarget.etIndividual), - new PredefinedEvent(LSID.MiliInd, GEDCOMTagName._MILI_IND, EventKind.ekFact, EventTarget.etIndividual), - new PredefinedEvent(LSID.MiliDis, GEDCOMTagName._MILI_DIS, EventKind.ekFact, EventTarget.etIndividual), + new PredefinedEvent(LSID.MiliInd, GEDCOMTagName._MILI_IND, EventKind.ekFact, EventTarget.etIndividual, true), + new PredefinedEvent(LSID.MiliDis, GEDCOMTagName._MILI_DIS, EventKind.ekFact, EventTarget.etIndividual, true), new PredefinedEvent(LSID.MiliRank, GEDCOMTagName._MILI_RANK, EventKind.ekFact, EventTarget.etIndividual), new PredefinedEvent(LSID.BloodGroup, GEDCOMTagName._BGRO, EventKind.ekFact, EventTarget.etIndividual), diff --git a/projects/GKCore/GKCore/Lists/ListSource.cs b/projects/GKCore/GKCore/Lists/ListSource.cs index dcbabdc6e..d9a89c1d2 100644 --- a/projects/GKCore/GKCore/Lists/ListSource.cs +++ b/projects/GKCore/GKCore/Lists/ListSource.cs @@ -137,7 +137,7 @@ public void Clear() fExternalFilter = null; fFilter.Clear(); - fFetchedRec = default(T); + fFetchedRec = default; fColumnsMap.Clear(); fListColumns.Clear(); diff --git a/projects/GKCore/GKCore/NetDiff/DiffUtil.cs b/projects/GKCore/GKCore/NetDiff/DiffUtil.cs index 784204e25..50c070647 100644 --- a/projects/GKCore/GKCore/NetDiff/DiffUtil.cs +++ b/projects/GKCore/GKCore/NetDiff/DiffUtil.cs @@ -132,8 +132,8 @@ private static IEnumerable> MakeResults(IEnumerable wayp foreach (var pair in MakePairsWithNext(waypoints)) { var status = GetStatus(pair.Item1, pair.Item2); - T obj1 = default(T); - T obj2 = default(T); + T obj1 = default; + T obj2 = default; switch (status) { case DiffStatus.Equal: @@ -276,8 +276,7 @@ internal class EditGraph private int offset; private bool isEnd; - public EditGraph( - IEnumerable seq1, IEnumerable seq2) + public EditGraph(IEnumerable seq1, IEnumerable seq2) { this.seq1 = seq1.ToArray(); this.seq2 = seq2.ToArray(); diff --git a/projects/GKCore/GKCore/ScriptEngine.cs b/projects/GKCore/GKCore/ScriptEngine.cs index 91f0cbe63..6a8072273 100644 --- a/projects/GKCore/GKCore/ScriptEngine.cs +++ b/projects/GKCore/GKCore/ScriptEngine.cs @@ -1,6 +1,6 @@ /* * "GEDKeeper", the personal genealogical database editor. - * Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. + * Copyright (C) 2009-2024 by Sergey V. Zhdanovskih. * * This file is part of "GEDKeeper". * @@ -18,13 +18,15 @@ * along with this program. If not, see . */ +#pragma warning disable IDE0060 // Remove unused parameter +#pragma warning disable IDE1006 // Naming Styles + #if !MOBILE using System; using System.Data; using System.IO; using System.Reflection; -using System.Text; using BSLib; using GDModel; using GDModel.Providers.GEDCOM; @@ -54,7 +56,7 @@ public ScriptException(string message) : base(message) public class ScriptEngine { private IBaseWindow fBase; - private IScriptConsole fView; + private readonly IScriptConsole fView; public ScriptEngine(IScriptConsole view) { @@ -92,15 +94,15 @@ private void lua_register(Lua lvm, string funcName) private void lua_init(Lua lvm) { - lua_register(lvm, "print"); - lua_register(lvm, "progress_init"); - lua_register(lvm, "progress_done"); - lua_register(lvm, "progress_step"); + lua_register(lvm, nameof(print)); + lua_register(lvm, nameof(progress_init)); + lua_register(lvm, nameof(progress_done)); + lua_register(lvm, nameof(progress_step)); - lua_register(lvm, "strpos"); - lua_register(lvm, "update_view"); - lua_register(lvm, "select_file"); - lua_register(lvm, "select_new_file"); + lua_register(lvm, nameof(strpos)); + lua_register(lvm, nameof(update_view)); + lua_register(lvm, nameof(select_file)); + lua_register(lvm, nameof(select_new_file)); lvm["rtNone"] = (int)GDMRecordType.rtNone; lvm["rtIndividual"] = (int)GDMRecordType.rtIndividual; @@ -118,114 +120,115 @@ private void lua_init(Lua lvm) lvm["rtSubmitter"] = (int)GDMRecordType.rtSubmitter; // any records - lua_register(lvm, "get_records_count"); - lua_register(lvm, "get_record"); - lua_register(lvm, "get_record_type"); - lua_register(lvm, "get_record_type_name"); - lua_register(lvm, "get_record_xref"); - lua_register(lvm, "get_record_uid"); - lua_register(lvm, "delete_record"); - lua_register(lvm, "record_is_filtered"); - lua_register(lvm, "select_record"); + lua_register(lvm, nameof(get_records_count)); + lua_register(lvm, nameof(get_record)); + lua_register(lvm, nameof(get_record_type)); + lua_register(lvm, nameof(get_record_type_name)); + lua_register(lvm, nameof(get_record_xref)); + lua_register(lvm, nameof(get_record_uid)); + lua_register(lvm, nameof(delete_record)); + lua_register(lvm, nameof(record_is_filtered)); + lua_register(lvm, nameof(select_record)); // any record : notes - lua_register(lvm, "get_record_notes_count"); + lua_register(lvm, nameof(get_record_notes_count)); // any record : multimedia links - lua_register(lvm, "get_record_medialinks_count"); - lua_register(lvm, "get_record_medialink"); - lua_register(lvm, "set_medialink_primary"); + lua_register(lvm, nameof(get_record_medialinks_count)); + lua_register(lvm, nameof(get_record_medialink)); + lua_register(lvm, nameof(set_medialink_primary)); // any record : bind notes, sources, multimedia - lua_register(lvm, "bind_record_note"); - lua_register(lvm, "bind_record_source"); + lua_register(lvm, nameof(bind_record_note)); + lua_register(lvm, nameof(bind_record_source)); // individual records - lua_register(lvm, "create_individual"); - lua_register(lvm, "get_individual_name"); - lua_register(lvm, "define_sex"); - lua_register(lvm, "get_individual_sex"); - lua_register(lvm, "set_individual_sex"); - lua_register(lvm, "define_patronymic"); - lua_register(lvm, "get_individual_parents_family"); - lua_register(lvm, "get_individual_spouses_count"); - lua_register(lvm, "get_individual_spouse_family"); - lua_register(lvm, "get_individual_primary_medialink"); + lua_register(lvm, nameof(create_individual)); + lua_register(lvm, nameof(get_individual_name)); + lua_register(lvm, nameof(define_sex)); + lua_register(lvm, nameof(get_individual_sex)); + lua_register(lvm, nameof(set_individual_sex)); + lua_register(lvm, nameof(define_patronymic)); + lua_register(lvm, nameof(get_individual_parents_family)); + lua_register(lvm, nameof(get_individual_spouses_count)); + lua_register(lvm, nameof(get_individual_spouse_family)); + lua_register(lvm, nameof(get_individual_primary_medialink)); // individual records : associations - lua_register(lvm, "get_individual_associations_count"); - lua_register(lvm, "get_individual_association"); - lua_register(lvm, "delete_individual_association"); - lua_register(lvm, "add_individual_association"); + lua_register(lvm, nameof(get_individual_associations_count)); + lua_register(lvm, nameof(get_individual_association)); + lua_register(lvm, nameof(delete_individual_association)); + lua_register(lvm, nameof(add_individual_association)); // individual records : events - lua_register(lvm, "get_individual_events_count"); - lua_register(lvm, "get_individual_event"); - lua_register(lvm, "delete_individual_event"); - lua_register(lvm, "get_individual_event_ex"); + lua_register(lvm, nameof(get_individual_events_count)); + lua_register(lvm, nameof(get_individual_event)); + lua_register(lvm, nameof(delete_individual_event)); + lua_register(lvm, nameof(get_individual_event_ex)); // individual records : groups - lua_register(lvm, "get_individual_groups_count"); - lua_register(lvm, "get_individual_group"); + lua_register(lvm, nameof(get_individual_groups_count)); + lua_register(lvm, nameof(get_individual_group)); // family records - lua_register(lvm, "create_family"); - lua_register(lvm, "bind_family_spouse"); - lua_register(lvm, "bind_family_child"); - lua_register(lvm, "get_family_husband"); - lua_register(lvm, "get_family_wife"); - lua_register(lvm, "get_family_childs_count"); - lua_register(lvm, "get_family_child"); + lua_register(lvm, nameof(create_family)); + lua_register(lvm, nameof(bind_family_spouse)); + lua_register(lvm, nameof(bind_family_child)); + lua_register(lvm, nameof(get_family_husband)); + lua_register(lvm, nameof(get_family_wife)); + lua_register(lvm, nameof(get_family_childs_count)); + lua_register(lvm, nameof(get_family_child)); // note records - lua_register(lvm, "create_note"); - lua_register(lvm, "add_note_text"); + lua_register(lvm, nameof(create_note)); + lua_register(lvm, nameof(add_note_text)); // any record with events (individual / family) - lua_register(lvm, "create_event"); + lua_register(lvm, nameof(create_event)); // events - lua_register(lvm, "get_event_value"); - lua_register(lvm, "get_event_place"); - lua_register(lvm, "get_event_date"); - lua_register(lvm, "get_event_name"); - lua_register(lvm, "set_event_value"); - lua_register(lvm, "set_event_place"); - lua_register(lvm, "set_event_date"); - lua_register(lvm, "get_event_year"); + lua_register(lvm, nameof(get_event_value)); + lua_register(lvm, nameof(get_event_place)); + lua_register(lvm, nameof(get_event_date)); + lua_register(lvm, nameof(get_event_name)); + lua_register(lvm, nameof(set_event_value)); + lua_register(lvm, nameof(set_event_place)); + lua_register(lvm, nameof(set_event_date)); + lua_register(lvm, nameof(get_event_year)); // source records - lua_register(lvm, "create_source"); - lua_register(lvm, "find_source"); + lua_register(lvm, nameof(create_source)); + lua_register(lvm, nameof(find_source)); // group records - lua_register(lvm, "create_group"); - lua_register(lvm, "bind_group_member"); - lua_register(lvm, "get_group_name"); + lua_register(lvm, nameof(create_group)); + lua_register(lvm, nameof(bind_group_member)); + lua_register(lvm, nameof(get_group_name)); // location records - lua_register(lvm, "get_location_usages"); + lua_register(lvm, nameof(create_location)); + lua_register(lvm, nameof(get_location_usages)); // csv - lua_register(lvm, "csv_load"); - lua_register(lvm, "csv_close"); - lua_register(lvm, "csv_get_cols"); - lua_register(lvm, "csv_get_rows"); - lua_register(lvm, "csv_get_cell"); - lua_register(lvm, "csv_create"); - lua_register(lvm, "csv_write_cell"); + lua_register(lvm, nameof(csv_load)); + lua_register(lvm, nameof(csv_close)); + lua_register(lvm, nameof(csv_get_cols)); + lua_register(lvm, nameof(csv_get_rows)); + lua_register(lvm, nameof(csv_get_cell)); + lua_register(lvm, nameof(csv_create)); + lua_register(lvm, nameof(csv_write_cell)); // experimental - lua_register(lvm, "ado_open"); - lua_register(lvm, "ado_close"); - lua_register(lvm, "ado_query_open"); - lua_register(lvm, "ado_query_close"); - lua_register(lvm, "ado_query_first"); - lua_register(lvm, "ado_query_prev"); - lua_register(lvm, "ado_query_next"); - lua_register(lvm, "ado_query_last"); - lua_register(lvm, "ado_get_query_field"); - lua_register(lvm, "ado_dump"); + lua_register(lvm, nameof(ado_open)); + lua_register(lvm, nameof(ado_close)); + lua_register(lvm, nameof(ado_query_open)); + lua_register(lvm, nameof(ado_query_close)); + lua_register(lvm, nameof(ado_query_first)); + lua_register(lvm, nameof(ado_query_prev)); + lua_register(lvm, nameof(ado_query_next)); + lua_register(lvm, nameof(ado_query_last)); + lua_register(lvm, nameof(ado_get_query_field)); + lua_register(lvm, nameof(ado_dump)); } #endregion @@ -631,6 +634,17 @@ public object get_family_child(object recPtr, int childIndex) return (fam == null) ? null : fBase.Context.Tree.GetPtrValue(fam.Children[childIndex]); } + public object create_location(string name, string date) + { + var loc = fBase.Context.Tree.CreateLocation(); + var locName = new GDMLocationName() { + StringValue = name, + Date = { StringValue = date } + }; + loc.Names.Add(locName); + return loc; + } + public int get_location_usages(object recPtr) { GDMLocationRecord loc = recPtr as GDMLocationRecord; @@ -725,7 +739,7 @@ public bool csv_load(string fileName, bool hasHeader) public bool csv_create(string fileName, int columnsCount, int rowsCount) { - bool result = false; + bool result; try { fCSVWriter = new CSVWriter(); diff --git a/projects/GKMap/GKMap.WinForms/GMapControl.cs b/projects/GKMap/GKMap.WinForms/GMapControl.cs index cbcf6a294..b65e80a6e 100644 --- a/projects/GKMap/GKMap.WinForms/GMapControl.cs +++ b/projects/GKMap/GKMap.WinForms/GMapControl.cs @@ -965,34 +965,22 @@ void IMapControl.ShowTileGridLines(object go, DrawTile tilePoint) void IMapControl.DoMouseClick(MapObject obj, EventArgs e) { if (obj is MapMarker) { - if (OnMarkerClick != null) { - OnMarkerClick(obj as MapMarker, (MouseEventArgs)e); - } + OnMarkerClick?.Invoke(obj as MapMarker, (MouseEventArgs)e); } else if (obj is MapRoute) { - if (OnRouteClick != null) { - OnRouteClick(obj as MapRoute, (MouseEventArgs)e); - } + OnRouteClick?.Invoke(obj as MapRoute, (MouseEventArgs)e); } else if (obj is MapPolygon) { - if (OnPolygonClick != null) { - OnPolygonClick(obj as MapPolygon, (MouseEventArgs)e); - } + OnPolygonClick?.Invoke(obj as MapPolygon, (MouseEventArgs)e); } } void IMapControl.DoMouseDoubleClick(MapObject obj, EventArgs e) { if (obj is MapMarker) { - if (OnMarkerDoubleClick != null) { - OnMarkerDoubleClick(obj as MapMarker, (MouseEventArgs)e); - } + OnMarkerDoubleClick?.Invoke(obj as MapMarker, (MouseEventArgs)e); } else if (obj is MapRoute) { - if (OnRouteDoubleClick != null) { - OnRouteDoubleClick(obj as MapRoute, (MouseEventArgs)e); - } + OnRouteDoubleClick?.Invoke(obj as MapRoute, (MouseEventArgs)e); } else if (obj is MapPolygon) { - if (OnPolygonDoubleClick != null) { - OnPolygonDoubleClick(obj as MapPolygon, (MouseEventArgs)e); - } + OnPolygonDoubleClick?.Invoke(obj as MapPolygon, (MouseEventArgs)e); } } diff --git a/projects/GKMap/GKMap.WinForms/GMapOverlay.cs b/projects/GKMap/GKMap.WinForms/GMapOverlay.cs index 458c27580..085a804b4 100644 --- a/projects/GKMap/GKMap.WinForms/GMapOverlay.cs +++ b/projects/GKMap/GKMap.WinForms/GMapOverlay.cs @@ -34,27 +34,15 @@ public virtual void OnRender(Graphics g) return; foreach (MapRoute r in Routes) { - if (r.IsVisible) { - var renderable = r as IRenderable; - if (renderable != null) - renderable.OnRender(g); - } + if (r.IsVisible && r is IRenderable renderable) renderable.OnRender(g); } foreach (MapPolygon p in Polygons) { - if (p.IsVisible) { - var renderable = p as IRenderable; - if (renderable != null) - renderable.OnRender(g); - } + if (p.IsVisible && p is IRenderable renderable) renderable.OnRender(g); } foreach (MapMarker m in Markers) { - if (m.IsVisible) { - var renderable = m as IRenderable; - if (renderable != null) - renderable.OnRender(g); - } + if (m.IsVisible && m is IRenderable renderable) renderable.OnRender(g); } // tooltips above diff --git a/projects/GKTests/GDModel/GDMAssociationTests.cs b/projects/GKTests/GDModel/GDMAssociationTests.cs index 7fe1154ba..a487a9ddd 100644 --- a/projects/GKTests/GDModel/GDMAssociationTests.cs +++ b/projects/GKTests/GDModel/GDMAssociationTests.cs @@ -1,6 +1,6 @@ /* * "GEDKeeper", the personal genealogical database editor. - * Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. + * Copyright (C) 2009-2024 by Sergey V. Zhdanovskih. * * This file is part of "GEDKeeper". * @@ -29,7 +29,7 @@ namespace GDModel [TestFixture] public class GDMAssociationTests { - private BaseContext fContext; + private readonly BaseContext fContext; public GDMAssociationTests() { diff --git a/projects/GKv2/GKComponents/GKUI/Components/GKDateControl.cs b/projects/GKv2/GKComponents/GKUI/Components/GKDateControl.cs index a7f5b875f..6df86de8e 100644 --- a/projects/GKv2/GKComponents/GKUI/Components/GKDateControl.cs +++ b/projects/GKv2/GKComponents/GKUI/Components/GKDateControl.cs @@ -40,6 +40,8 @@ public class GKDateControl : UserControl, IDateControl, ILocalizable private GDMDateType fFixedDateType; + [Browsable(false)] + [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)] public GDMCustomDate Date { get { return GetDate(); } diff --git a/projects/plugins/GKCalendarPlugin/HistoryDateBox.cs b/projects/plugins/GKCalendarPlugin/HistoryDateBox.cs index d31587676..3e5f0e5f0 100644 --- a/projects/plugins/GKCalendarPlugin/HistoryDateBox.cs +++ b/projects/plugins/GKCalendarPlugin/HistoryDateBox.cs @@ -1,6 +1,6 @@ /* * "GEDKeeper", the personal genealogical database editor. - * Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. + * Copyright (C) 2009-2024 by Sergey V. Zhdanovskih. * * This file is part of "GEDKeeper". * @@ -199,14 +199,12 @@ private void SetDate(double value) private void OnCalendarChanged() { - var eventHandler = CalendarChanged; - if (eventHandler != null) eventHandler(this, new EventArgs()); + CalendarChanged?.Invoke(this, new EventArgs()); } private void OnDateChanged() { - var eventHandler = DateChanged; - if (eventHandler != null) eventHandler(this, new EventArgs()); + DateChanged?.Invoke(this, new EventArgs()); } private void cmbCalendar_SelectedIndexChanged(object sender, EventArgs e) diff --git a/projects/plugins/GKHistoryDataPlugin/HistoryData.cs b/projects/plugins/GKHistoryDataPlugin/HistoryData.cs index 73c81c6d7..04827dfcf 100644 --- a/projects/plugins/GKHistoryDataPlugin/HistoryData.cs +++ b/projects/plugins/GKHistoryDataPlugin/HistoryData.cs @@ -1,6 +1,7 @@ -/* + +/* * "GEDKeeper", the personal genealogical database editor. - * Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. + * Copyright (C) 2009-2024 by Sergey V. Zhdanovskih. * * This file is part of "GEDKeeper". * @@ -18,8 +19,6 @@ * along with this program. If not, see . */ -#pragma warning disable SYSLIB0014 - using System; using System.Collections.Generic; using System.IO; diff --git a/projects/plugins/GKLifePlugin/ConwayLife/LifeViewer.cs b/projects/plugins/GKLifePlugin/ConwayLife/LifeViewer.cs index 18603bb3e..7257f8350 100644 --- a/projects/plugins/GKLifePlugin/ConwayLife/LifeViewer.cs +++ b/projects/plugins/GKLifePlugin/ConwayLife/LifeViewer.cs @@ -168,7 +168,7 @@ protected void Change() { Invalidate(); - if (fOnChange != null) fOnChange(this); + fOnChange?.Invoke(this); } protected override void OnMouseMove(MouseEventArgs e) diff --git a/projects/plugins/GKStdReports/AncestorStatisticsReport.cs b/projects/plugins/GKStdReports/AncestorStatisticsReport.cs index 6bd252d85..f5d09ef52 100644 --- a/projects/plugins/GKStdReports/AncestorStatisticsReport.cs +++ b/projects/plugins/GKStdReports/AncestorStatisticsReport.cs @@ -1,6 +1,6 @@ /* * "GEDKeeper", the personal genealogical database editor. - * Copyright (C) 2009-2023 by Sergey V. Zhdanovskih. + * Copyright (C) 2009-2024 by Sergey V. Zhdanovskih. * * This file is part of "GEDKeeper". * @@ -113,13 +113,13 @@ public ConsanguinityInfo(GDMIndividualRecord indi) } } - private Dictionary fConsanguinityCommonIndiMap = new Dictionary(); + private readonly Dictionary fConsanguinityCommonIndiMap = new Dictionary(); private double fConsanguinityFactor; - private List fGenerations = new List(); - private Dictionary fImplexCommonIndiMap = new Dictionary(); + private readonly List fGenerations = new List(); + private readonly Dictionary fImplexCommonIndiMap = new Dictionary(); private double fImplexFactor; - private HashSet fIndiSet = new HashSet(); - private HashSet fCommonAncestorSet = new HashSet(); + private readonly HashSet fIndiSet = new HashSet(); + private readonly HashSet fCommonAncestorSet = new HashSet(); private void ClearStats() { diff --git a/projects/plugins/GKTreeSyncPlugin/clean.cmd b/projects/plugins/GKTreeSyncPlugin/clean.cmd new file mode 100644 index 000000000..45dfcfb5e --- /dev/null +++ b/projects/plugins/GKTreeSyncPlugin/clean.cmd @@ -0,0 +1,3 @@ +rmdir .\.vs /s /q 2>NUL +rmdir .\bin /s /q 2>NUL +rmdir .\obj /s /q 2>NUL