summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2020-11-25 21:21:03 +0100
committerLioncash <mathew1800@gmail.com>2020-12-03 06:54:31 +0100
commit1ea6bdef058a789e2771511f741bffcca73c3525 (patch)
tree6bcfaa3649add0bb73ff5bbcf982197439c896d1 /src/common
parentMerge pull request #4959 from Morph1984/emulated-controller-styleset (diff)
downloadyuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar.gz
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar.bz2
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar.lz
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar.xz
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.tar.zst
yuzu-1ea6bdef058a789e2771511f741bffcca73c3525.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;