Skip to content

Commit

Permalink
More CodeQL Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmachapman committed Jan 18, 2023
1 parent abb725c commit 0ffb906
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions GoToBible.Engine/GotoBibleApiRenderer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace GoToBible.Engine;
/// The GoTo.Bible API Renderer.
/// </summary>
/// <seealso cref="GoToBible.Model.IRenderer" />
public class GotoBibleApiRenderer : IRenderer
public sealed class GotoBibleApiRenderer : IRenderer
{
/// <summary>
/// The HTTP client.
Expand Down Expand Up @@ -72,7 +72,7 @@ public async Task<RenderedPassage> RenderAsync(RenderingParameters parameters, b
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
protected virtual void Dispose(bool disposing)
private void Dispose(bool disposing)
{
if (!this.disposedValue)
{
Expand Down
4 changes: 2 additions & 2 deletions GoToBible.Web/Server/Controllers/TranslationsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ public async IAsyncEnumerable<Translation> Get()
await foreach (Translation translation in provider.GetTranslationsAsync())
{
// Clean up any names we are displaying
if (NameSubstitutions.ContainsKey(translation.Name))
if (NameSubstitutions.TryGetValue(translation.Name, out string? translationName))
{
translation.Name = NameSubstitutions[translation.Name];
translation.Name = translationName;
}

// Make sure this isn't a blocked translation
Expand Down

0 comments on commit 0ffb906

Please sign in to comment.