From 441b3fe2a18ef5214d08e1df1db90a479b44022d Mon Sep 17 00:00:00 2001 From: "henrike@webrtc.org" Date: Thu, 8 Dec 2011 02:03:49 +0000 Subject: [PATCH] Made some global statics have function scope so that the global static count is 0 for the rtp_rtcp module. Review URL: http://webrtc-codereview.appspot.com/316001 git-svn-id: http://webrtc.googlecode.com/svn/trunk@1125 4adac7df-926f-26a2-2b94-8c16560cd09d --- src/modules/rtp_rtcp/source/rtp_utility.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/modules/rtp_rtcp/source/rtp_utility.cc b/src/modules/rtp_rtcp/source/rtp_utility.cc index f0156375cb..2191af7e99 100644 --- a/src/modules/rtp_rtcp/source/rtp_utility.cc +++ b/src/modules/rtp_rtcp/source/rtp_utility.cc @@ -250,14 +250,14 @@ void UnixSystemClock::CurrentNTP(WebRtc_UWord32& secs, WebRtc_UWord32& frac) } #endif -#if defined(_WIN32) -static WindowsSystemClock system_clock; -#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) -static UnixSystemClock system_clock; -#endif - RtpRtcpClock* GetSystemClock() { + // TODO(hellner): violates the style guide (non-POD static instance). +#if defined(_WIN32) + static WindowsSystemClock system_clock; +#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) + static UnixSystemClock system_clock; +#endif return &system_clock; }