Skip to content

Commit

Permalink
Fix a few recently introduced code smells, fix GitHub Actions build w…
Browse files Browse the repository at this point in the history
…ith ASAN & TSAN (#7532)
  • Loading branch information
oleg-derevenetz authored Aug 10, 2023
1 parent 04408e1 commit 557e6d7
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clang_analyzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
clang:
name: Clang Analyzer
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang_tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ concurrency:
jobs:
tidy:
name: Clang-Tidy
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 60
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code_style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
style:
name: Code style check
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/iwyu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
iwyu:
name: IWYU
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
timeout-minutes: 30
defaults:
run:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
release_name: Ubuntu x86-64 (Linux) build with SDL1 (latest commit)
release_tag: fheroes2-linux-sdl1_dev
- name: Linux x86-64 SDL1 Debug
os: ubuntu-20.04
os: ubuntu-latest
dependencies: libsdl1.2-dev libsdl-mixer1.2-dev gettext
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
release_name: Ubuntu x86-64 (Linux) build with SDL2 (latest commit)
release_tag: fheroes2-linux-sdl2_dev
- name: Linux x86-64 SDL2 Debug
os: ubuntu-20.04
os: ubuntu-latest
dependencies: libsdl2-dev libsdl2-mixer-dev libsdl2-image-dev gettext
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
release_name: Ubuntu ARM64 (Linux) build with SDL1 (latest commit)
release_tag: fheroes2-linux-arm-sdl1_dev
- name: Linux ARM64 SDL1 Debug
os: ubuntu-22.04
os: ubuntu-latest
dependencies: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libsdl1.2-dev:arm64 libsdl-mixer1.2-dev:arm64 gettext
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
release_name: Ubuntu ARM64 (Linux) build with SDL2 (latest commit)
release_tag: fheroes2-linux-arm-sdl2_dev
- name: Linux ARM64 SDL2 Debug
os: ubuntu-22.04
os: ubuntu-latest
dependencies: gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libsdl2-dev:arm64 libsdl2-mixer-dev:arm64 libsdl2-image-dev:arm64 libpng-dev:arm64 gettext
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down Expand Up @@ -183,7 +183,7 @@ jobs:
release_name: macOS x86-64 build with SDL1 (latest commit)
release_tag: fheroes2-osx-sdl1_dev
- name: macOS SDL1 App Bundle
os: macos-11
os: macos-latest
dependencies: sdl sdl_mixer dylibbundler
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down Expand Up @@ -224,7 +224,7 @@ jobs:
release_name: macOS x86-64 build with SDL2 (latest commit)
release_tag: fheroes2-osx-sdl2_dev
- name: macOS SDL2 App Bundle
os: macos-11
os: macos-latest
dependencies: sdl2 sdl2_mixer dylibbundler
env:
FHEROES2_STRICT_COMPILATION: ON
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.Locale;
import java.util.Objects;
import java.util.Queue;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream;
Expand Down Expand Up @@ -134,7 +134,7 @@ private void importSaveFiles( final File saveFileDir, final List<String> allowed
new Thread( () -> {
Exception caughtException = null;

final Function<String, Boolean> checkExtension = ( String name ) ->
final Predicate<String> checkExtension = ( String name ) ->
{
final String lowercaseName = name.toLowerCase( Locale.ROOT );

Expand All @@ -158,7 +158,7 @@ private void importSaveFiles( final File saveFileDir, final List<String> allowed
}

final String zEntryFileName = new File( zEntry.getName() ).getName();
if ( !checkExtension.apply( zEntryFileName ) ) {
if ( !checkExtension.test( zEntryFileName ) ) {
continue;
}

Expand Down

0 comments on commit 557e6d7

Please sign in to comment.