Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: C/C++ CI
name: Linux
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
Expand Down Expand Up @@ -35,7 +35,7 @@ jobs:
python3-dev

- name: Meson setup
run: meson setup _build -Db_sanitize=address,undefined
run: CFLAGS="-Werror" meson setup _build -Db_sanitize=address,undefined

- name: Build
run: meson compile -C _build
Expand All @@ -45,7 +45,8 @@ jobs:
cd _build
meson test -v

- name: Test swig
- name: Test swig build
run: |
meson setup _build --reconfigure -Dswig_lang=python
rm -rf _build
meson setup _build -Dswig_lang=python
meson compile -C _build
41 changes: 41 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: MacOS
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true

on:
push:
branches: [ master ]
paths:
- '**'
- '!**.yml'
- '!**.md'
- '**/macos.yml'

pull_request:
branches: [ master ]
paths:
- '**'
- '!**.yml'
- '!**.md'
- '**/macos.yml'

jobs:
MacOS:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew update
brew install \
meson

- name: Meson setup
run: CFLAGS="-Werror" meson setup _build -Db_sanitize=address,undefined

- name: Build
run: meson compile -C _build

- name: Test
run: meson test -v -C _build
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Meson setup
shell: msys2 {0}
run: |
meson setup _build
CFLAGS="-Werror" meson setup _build

- name: Build
shell: msys2 {0}
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[![Linux](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/linux.yml/badge.svg)](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/linux.yml)
[![Windows](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/windows.yml/badge.svg)](https://github.com/theimpossibleastronaut/deckhandler/actions/workflows/windows.yml)
[![MacOS](https://github.com/Dealer-s-Choice/deckhandler/actions/workflows/macos.yml/badge.svg)](https://github.com/Dealer-s-Choice/deckhandler/actions/workflows/macos.yml)

# deckhandler
Library that will create a deck of cards and shuffle it.
Expand Down
4 changes: 2 additions & 2 deletions subprojects/pcg/pcg_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ uint32_t pcg32_random_r(pcg32_random_t* rng)
return (xorshifted >> rot) | (xorshifted << ((-rot) & 31));
}

uint32_t pcg32_random()
uint32_t pcg32_random(void)
{
return pcg32_random_r(&pcg32_global);
}
Expand Down Expand Up @@ -98,7 +98,7 @@ uint32_t pcg32_boundedrand_r(pcg32_random_t* rng, uint32_t bound)
// should usually terminate quickly; on average (assuming all bounds are
// equally likely), 82.25% of the time, we can expect it to require just
// one iteration. In the worst case, someone passes a bound of 2^31 + 1
// (i.e., 2147483649), which invalidates almost 50% of the range. In
// (i.e., 2147483649), which invalidates almost 50% of the range. In
// practice, bounds are typically small and only a tiny amount of the range
// is eliminated.
for (;;) {
Expand Down