diff --git a/src/common/cityhash.cpp b/src/common/cityhash.cpp index d50ac9e6cf..030f5981ff 100644 --- a/src/common/cityhash.cpp +++ b/src/common/cityhash.cpp @@ -1,3 +1,6 @@ +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + // SPDX-FileCopyrightText: 2011 Google, Inc. // SPDX-FileContributor: Geoff Pike // SPDX-FileContributor: Jyrki Alakuijala @@ -27,8 +30,6 @@ #define WORDS_BIGENDIAN 1 #endif -using namespace std; - namespace Common { static u64 unaligned_load64(const char* p) { @@ -135,18 +136,18 @@ static u64 HashLen17to32(const char* s, size_t len) { // Return a 16-byte hash for 48 bytes. Quick and dirty. // Callers do best to use "random-looking" values for a and b. -static pair WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) { +static std::pair WeakHashLen32WithSeeds(u64 w, u64 x, u64 y, u64 z, u64 a, u64 b) { a += w; b = Rotate(b + a + z, 21); u64 c = a; a += x; a += y; b += Rotate(a, 44); - return make_pair(a + z, b + c); + return std::make_pair(a + z, b + c); } // Return a 16-byte hash for s[0] ... s[31], a, and b. Quick and dirty. -static pair WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) { +static std::pair WeakHashLen32WithSeeds(const char* s, u64 a, u64 b) { return WeakHashLen32WithSeeds(Fetch64(s), Fetch64(s + 8), Fetch64(s + 16), Fetch64(s + 24), a, b); } @@ -189,8 +190,8 @@ u64 CityHash64(const char* s, size_t len) { u64 x = Fetch64(s + len - 40); u64 y = Fetch64(s + len - 16) + Fetch64(s + len - 56); u64 z = HashLen16(Fetch64(s + len - 48) + len, Fetch64(s + len - 24)); - pair v = WeakHashLen32WithSeeds(s + len - 64, len, z); - pair w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x); + std::pair v = WeakHashLen32WithSeeds(s + len - 64, len, z); + std::pair w = WeakHashLen32WithSeeds(s + len - 32, y + k1, x); x = x * k1 + Fetch64(s); // Decrease len to the nearest multiple of 64, and operate on 64-byte chunks. @@ -258,7 +259,7 @@ u128 CityHash128WithSeed(const char* s, size_t len, u128 seed) { // We expect len >= 128 to be the common case. Keep 56 bytes of state: // v, w, x, y, and z. - pair v, w; + std::pair v, w; u64 x = seed[0]; u64 y = seed[1]; u64 z = len * k1; diff --git a/src/yuzu_room_standalone/main.cpp b/src/yuzu_room_standalone/main.cpp index 3129fb9dd9..157d583104 100644 --- a/src/yuzu_room_standalone/main.cpp +++ b/src/yuzu_room_standalone/main.cpp @@ -1,6 +1,7 @@ -#include +// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later -using namespace std; +#include int main() {