summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-12-03 08:08:43 +0100
committerGitHub <noreply@github.com>2020-12-03 08:08:43 +0100
commit88089c87546b62536a27738f5ee03dff52fa76e9 (patch)
tree5221c80d0ac3e7bbdb0c342098378e6c84951658 /src/common
parentMerge pull request #5002 from ameerj/nvdec-frameskip (diff)
parentaudio_core: Make shadowing and unused parameters errors (diff)
downloadyuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar.gz
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar.bz2
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar.lz
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar.xz
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.tar.zst
yuzu-88089c87546b62536a27738f5ee03dff52fa76e9.zip
Diffstat (limited to 'src/common')
-rw-r--r--src/common/wall_clock.cpp4
-rw-r--r--src/common/wall_clock.h6
-rw-r--r--src/common/x64/native_clock.cpp8
-rw-r--r--src/common/x64/native_clock.h3
4 files changed, 11 insertions, 10 deletions
diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp
index 452a2837e..a8c143f85 100644
--- a/src/common/wall_clock.cpp
+++ b/src/common/wall_clock.cpp
@@ -17,8 +17,8 @@ using base_time_point = std::chrono::time_point<base_timer>;
class StandardWallClock final : public WallClock {
public:
- StandardWallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency)
- : WallClock(emulated_cpu_frequency, emulated_clock_frequency, false) {
+ explicit StandardWallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_)
+ : WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, false) {
start_time = base_timer::now();
}
diff --git a/src/common/wall_clock.h b/src/common/wall_clock.h
index bc7adfbf8..cef3e9499 100644
--- a/src/common/wall_clock.h
+++ b/src/common/wall_clock.h
@@ -38,9 +38,9 @@ public:
}
protected:
- WallClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, bool is_native)
- : emulated_cpu_frequency{emulated_cpu_frequency},
- emulated_clock_frequency{emulated_clock_frequency}, is_native{is_native} {}
+ explicit WallClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_, bool is_native_)
+ : emulated_cpu_frequency{emulated_cpu_frequency_},
+ emulated_clock_frequency{emulated_clock_frequency_}, is_native{is_native_} {}
u64 emulated_cpu_frequency;
u64 emulated_clock_frequency;
diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp
index 424b39b1f..eb8a7782f 100644
--- a/src/common/x64/native_clock.cpp
+++ b/src/common/x64/native_clock.cpp
@@ -43,10 +43,10 @@ u64 EstimateRDTSCFrequency() {
}
namespace X64 {
-NativeClock::NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency,
- u64 rtsc_frequency)
- : WallClock(emulated_cpu_frequency, emulated_clock_frequency, true), rtsc_frequency{
- rtsc_frequency} {
+NativeClock::NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_,
+ u64 rtsc_frequency_)
+ : WallClock(emulated_cpu_frequency_, emulated_clock_frequency_, true), rtsc_frequency{
+ rtsc_frequency_} {
_mm_mfence();
last_measure = __rdtsc();
accumulated_ticks = 0U;
diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h
index 97aab6ac9..6d1e32ac8 100644
--- a/src/common/x64/native_clock.h
+++ b/src/common/x64/native_clock.h
@@ -14,7 +14,8 @@ namespace Common {
namespace X64 {
class NativeClock final : public WallClock {
public:
- NativeClock(u64 emulated_cpu_frequency, u64 emulated_clock_frequency, u64 rtsc_frequency);
+ explicit NativeClock(u64 emulated_cpu_frequency_, u64 emulated_clock_frequency_,
+ u64 rtsc_frequency_);
std::chrono::nanoseconds GetTimeNS() override;