Skip to content

Commit

Permalink
Fix default arguments in overrides which don't match the declaration
Browse files Browse the repository at this point in the history
not enabling the relevant Analyzer rule MA0061 since that also triggers
when the override omits the default argument
  • Loading branch information
YoshiRulz committed Jul 3, 2024
1 parent 1f7d75b commit 1c302e5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/BizHawk.Client.Common/Api/Classes/MemoryApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ private void WriteUnsigned(long addr, uint value, int size, string domain = null
public IReadOnlyCollection<string> GetMemoryDomainList()
=> DomainList.Select(static domain => domain.Name).ToList();

public uint GetMemoryDomainSize(string name = null) => (uint) NamedDomainOrCurrent(name).Size;
public uint GetMemoryDomainSize(string name)
=> (uint) NamedDomainOrCurrent(name).Size;

public string GetCurrentMemoryDomain() => Domain.Name;

Expand Down
2 changes: 1 addition & 1 deletion src/BizHawk.Client.Common/Api/Classes/MovieApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public string GetInputAsMnemonic(int frame)
return lg.GenerateLogEntry();
}

public void Save(string filename = null)
public void Save(string filename)
{
if (_movieSession.Movie.NotActive())
{
Expand Down
4 changes: 2 additions & 2 deletions src/BizHawk.Client.Common/Api/Classes/SQLiteApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public string OpenDatabase(string name)
return "Database Opened Successfully";
}

public string WriteCommand(string query = null)
public string WriteCommand(string query)
{
if (string.IsNullOrWhiteSpace(query)) return "query is empty";
if (_dbConnection == null) return "Database not open.";
Expand All @@ -71,7 +71,7 @@ public string WriteCommand(string query = null)
return result;
}

public object ReadCommand(string query = null)
public object ReadCommand(string query)
{
if (string.IsNullOrWhiteSpace(query)) return "query is empty";
if (_dbConnection == null) return "Database not open.";
Expand Down

0 comments on commit 1c302e5

Please sign in to comment.