diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 372dc9273..eefb03f7b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,9 +49,9 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: windows-${{env.artifact}} path: ${{env.build_dir}}/spla_x64.dll @@ -75,13 +75,13 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: linux-${{env.artifact}} path: ${{env.build_dir}}/libspla_x64.so macos: - runs-on: macos-11 + runs-on: macos-14 steps: - uses: actions/checkout@v2 with: @@ -105,9 +105,9 @@ jobs: run: cmake --build ${{ env.build_dir }} - name: Upload binary - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: ${{env.artifact}} + name: macos-${{env.artifact}} path: | ${{env.build_dir}}/libspla_x64.dylib ${{env.build_dir}}/libspla_arm64.dylib diff --git a/src/util/pair_hash.hpp b/src/util/pair_hash.hpp index 62a90171e..347e23416 100644 --- a/src/util/pair_hash.hpp +++ b/src/util/pair_hash.hpp @@ -37,11 +37,20 @@ namespace spla { * @{ */ + template + inline void hash_combine(std::size_t& seed, const T& v) { + std::hash hasher; + seed ^= hasher(v) + 0x9e3779b9 + (seed << 6) + (seed >> 2); + } + struct pair_hash { public: template std::size_t operator()(const std::pair& x) const { - return std::hash()(x.first) ^ std::hash()(x.second); + std::size_t seed = 0; + hash_combine(seed, x.first); + hash_combine(seed, x.second); + return seed; } };