diff options
| author | 2015-02-13 15:53:34 -0500 | |
|---|---|---|
| committer | 2015-02-13 15:53:34 -0500 | |
| commit | 29a9e4ac25504bee82f273184a1afcc88a3e61e1 (patch) | |
| tree | 9fa96cdc2bc180ac4c5a2c33158ae7cc60f2a308 /src/core/core_timing.cpp | |
| parent | Merge pull request #571 from lioncash/cleanup (diff) | |
| parent | core: Apply static to local functions (diff) | |
| download | yuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.tar.gz yuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.tar.xz yuzu-29a9e4ac25504bee82f273184a1afcc88a3e61e1.zip | |
Merge pull request #572 from lioncash/prototypes
core: Apply static to local functions
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index d96d3fe16..12ea3ff19 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -69,7 +69,7 @@ using AdvanceCallback = void(int cycles_executed); | |||
| 69 | static AdvanceCallback* advance_callback = nullptr; | 69 | static AdvanceCallback* advance_callback = nullptr; |
| 70 | static std::vector<MHzChangeCallback> mhz_change_callbacks; | 70 | static std::vector<MHzChangeCallback> mhz_change_callbacks; |
| 71 | 71 | ||
| 72 | void FireMhzChange() { | 72 | static void FireMhzChange() { |
| 73 | for (auto callback : mhz_change_callbacks) | 73 | for (auto callback : mhz_change_callbacks) |
| 74 | callback(); | 74 | callback(); |
| 75 | } | 75 | } |
| @@ -97,7 +97,7 @@ u64 GetGlobalTimeUs() { | |||
| 97 | return last_global_time_us + us_since_last; | 97 | return last_global_time_us + us_since_last; |
| 98 | } | 98 | } |
| 99 | 99 | ||
| 100 | Event* GetNewEvent() { | 100 | static Event* GetNewEvent() { |
| 101 | if (!event_pool) | 101 | if (!event_pool) |
| 102 | return new Event; | 102 | return new Event; |
| 103 | 103 | ||
| @@ -106,7 +106,7 @@ Event* GetNewEvent() { | |||
| 106 | return event; | 106 | return event; |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | Event* GetNewTsEvent() { | 109 | static Event* GetNewTsEvent() { |
| 110 | allocated_ts_events++; | 110 | allocated_ts_events++; |
| 111 | 111 | ||
| 112 | if (!event_ts_pool) | 112 | if (!event_ts_pool) |
| @@ -117,12 +117,12 @@ Event* GetNewTsEvent() { | |||
| 117 | return event; | 117 | return event; |
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | void FreeEvent(Event* event) { | 120 | static void FreeEvent(Event* event) { |
| 121 | event->next = event_pool; | 121 | event->next = event_pool; |
| 122 | event_pool = event; | 122 | event_pool = event; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void FreeTsEvent(Event* event) { | 125 | static void FreeTsEvent(Event* event) { |
| 126 | event->next = event_ts_pool; | 126 | event->next = event_ts_pool; |
| 127 | event_ts_pool = event; | 127 | event_ts_pool = event; |
| 128 | allocated_ts_events--; | 128 | allocated_ts_events--; |
| @@ -133,7 +133,7 @@ int RegisterEvent(const char* name, TimedCallback callback) { | |||
| 133 | return (int)event_types.size() - 1; | 133 | return (int)event_types.size() - 1; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | void AntiCrashCallback(u64 userdata, int cycles_late) { | 136 | static void AntiCrashCallback(u64 userdata, int cycles_late) { |
| 137 | LOG_CRITICAL(Core_Timing, "Savestate broken: an unregistered event was called."); | 137 | LOG_CRITICAL(Core_Timing, "Savestate broken: an unregistered event was called."); |
| 138 | Core::Halt("invalid timing events"); | 138 | Core::Halt("invalid timing events"); |
| 139 | } | 139 | } |
| @@ -228,7 +228,7 @@ void ClearPendingEvents() { | |||
| 228 | } | 228 | } |
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | void AddEventToQueue(Event* new_event) { | 231 | static void AddEventToQueue(Event* new_event) { |
| 232 | Event* prev_event = nullptr; | 232 | Event* prev_event = nullptr; |
| 233 | Event** next_event = &first; | 233 | Event** next_event = &first; |
| 234 | for (;;) { | 234 | for (;;) { |