Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(557)

Side by Side Diff: webrtc/system_wrappers/source/clock.cc

Issue 1216353002: Fix some clang warnings with -Wmissing-braces in WebRTC. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc/trunk/webrtc.git@master
Patch Set: Fix paths, maybe Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 filetime_ref_as_ul.LowPart = ref_point_.file_time.dwLowDateTime; 148 filetime_ref_as_ul.LowPart = ref_point_.file_time.dwLowDateTime;
149 filetime_ref_as_ul.QuadPart += 149 filetime_ref_as_ul.QuadPart +=
150 static_cast<ULONGLONG>((elapsed_ms.QuadPart) * 1000 * 10); 150 static_cast<ULONGLONG>((elapsed_ms.QuadPart) * 1000 * 10);
151 151
152 // Copy to result 152 // Copy to result
153 current_time->dwHighDateTime = filetime_ref_as_ul.HighPart; 153 current_time->dwHighDateTime = filetime_ref_as_ul.HighPart;
154 current_time->dwLowDateTime = filetime_ref_as_ul.LowPart; 154 current_time->dwLowDateTime = filetime_ref_as_ul.LowPart;
155 } 155 }
156 156
157 static ReferencePoint GetSystemReferencePoint() { 157 static ReferencePoint GetSystemReferencePoint() {
158 ReferencePoint ref = {0}; 158 ReferencePoint ref = {};
159 FILETIME ft0 = {0}; 159 FILETIME ft0 = {};
160 FILETIME ft1 = {0}; 160 FILETIME ft1 = {};
161 // Spin waiting for a change in system time. As soon as this change happens, 161 // Spin waiting for a change in system time. As soon as this change happens,
162 // get the matching call for timeGetTime() as soon as possible. This is 162 // get the matching call for timeGetTime() as soon as possible. This is
163 // assumed to be the most accurate offset that we can get between 163 // assumed to be the most accurate offset that we can get between
164 // timeGetTime() and system time. 164 // timeGetTime() and system time.
165 165
166 // Set timer accuracy to 1 ms. 166 // Set timer accuracy to 1 ms.
167 timeBeginPeriod(1); 167 timeBeginPeriod(1);
168 GetSystemTimeAsFileTime(&ft0); 168 GetSystemTimeAsFileTime(&ft0);
169 do { 169 do {
170 GetSystemTimeAsFileTime(&ft1); 170 GetSystemTimeAsFileTime(&ft1);
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 void SimulatedClock::AdvanceTimeMilliseconds(int64_t milliseconds) { 262 void SimulatedClock::AdvanceTimeMilliseconds(int64_t milliseconds) {
263 AdvanceTimeMicroseconds(1000 * milliseconds); 263 AdvanceTimeMicroseconds(1000 * milliseconds);
264 } 264 }
265 265
266 void SimulatedClock::AdvanceTimeMicroseconds(int64_t microseconds) { 266 void SimulatedClock::AdvanceTimeMicroseconds(int64_t microseconds) {
267 WriteLockScoped synchronize(*lock_); 267 WriteLockScoped synchronize(*lock_);
268 time_us_ += microseconds; 268 time_us_ += microseconds;
269 } 269 }
270 270
271 }; // namespace webrtc 271 }; // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/desktop_capture/desktop_frame_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698