File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949 run : cmake --build ${{ env.build_dir }}
5050
5151 - name : Upload binary
52- uses : actions/upload-artifact@v2
52+ uses : actions/upload-artifact@v4
5353 with :
54- name : ${{env.artifact}}
54+ name : windows- ${{env.artifact}}
5555 path : ${{env.build_dir}}/spla_x64.dll
5656
5757
@@ -75,13 +75,13 @@ jobs:
7575 run : cmake --build ${{ env.build_dir }}
7676
7777 - name : Upload binary
78- uses : actions/upload-artifact@v2
78+ uses : actions/upload-artifact@v4
7979 with :
80- name : ${{env.artifact}}
80+ name : linux- ${{env.artifact}}
8181 path : ${{env.build_dir}}/libspla_x64.so
8282
8383 macos :
84- runs-on : macos-11
84+ runs-on : macos-14
8585 steps :
8686 - uses : actions/checkout@v2
8787 with :
@@ -105,9 +105,9 @@ jobs:
105105 run : cmake --build ${{ env.build_dir }}
106106
107107 - name : Upload binary
108- uses : actions/upload-artifact@v2
108+ uses : actions/upload-artifact@v4
109109 with :
110- name : ${{env.artifact}}
110+ name : macos- ${{env.artifact}}
111111 path : |
112112 ${{env.build_dir}}/libspla_x64.dylib
113113 ${{env.build_dir}}/libspla_arm64.dylib
Original file line number Diff line number Diff line change @@ -37,11 +37,20 @@ namespace spla {
3737 * @{
3838 */
3939
40+ template <class T >
41+ inline void hash_combine (std::size_t & seed, const T& v) {
42+ std::hash<T> hasher;
43+ seed ^= hasher (v) + 0x9e3779b9 + (seed << 6 ) + (seed >> 2 );
44+ }
45+
4046 struct pair_hash {
4147 public:
4248 template <typename T, typename U>
4349 std::size_t operator ()(const std::pair<T, U>& x) const {
44- return std::hash<T>()(x.first ) ^ std::hash<U>()(x.second );
50+ std::size_t seed = 0 ;
51+ hash_combine (seed, x.first );
52+ hash_combine (seed, x.second );
53+ return seed;
4554 }
4655 };
4756
You can’t perform that action at this time.
0 commit comments