Fix some chromium-style warnings in webrtc/system_wrappers/
BUG=163 R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1906004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4464 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
a7e360e89b
commit
a2a2718a6c
@ -55,17 +55,17 @@ class SimulatedClock : public Clock {
|
||||
|
||||
// Return a timestamp in milliseconds relative to some arbitrary source; the
|
||||
// source is fixed for this clock.
|
||||
virtual int64_t TimeInMilliseconds();
|
||||
virtual int64_t TimeInMilliseconds() OVERRIDE;
|
||||
|
||||
// Return a timestamp in microseconds relative to some arbitrary source; the
|
||||
// source is fixed for this clock.
|
||||
virtual int64_t TimeInMicroseconds();
|
||||
virtual int64_t TimeInMicroseconds() OVERRIDE;
|
||||
|
||||
// Retrieve an NTP absolute timestamp in milliseconds.
|
||||
virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions);
|
||||
virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) OVERRIDE;
|
||||
|
||||
// Converts an NTP timestamp to a millisecond timestamp.
|
||||
virtual int64_t CurrentNtpInMilliseconds();
|
||||
virtual int64_t CurrentNtpInMilliseconds() OVERRIDE;
|
||||
|
||||
// Advance the simulated clock with a given number of milliseconds or
|
||||
// microseconds.
|
||||
|
@ -78,9 +78,7 @@ class ThreadWrapper {
|
||||
// should be lower than (number of CPUs - 1). amount_of_processors should be
|
||||
// equal to the number of processors listed in processor_numbers.
|
||||
virtual bool SetAffinity(const int* processor_numbers,
|
||||
const unsigned int amount_of_processors) {
|
||||
return false;
|
||||
}
|
||||
const unsigned int amount_of_processors);
|
||||
|
||||
// Stops the spawned thread and waits for it to be reclaimed with a timeout
|
||||
// of two seconds. Will return false if the thread was not reclaimed.
|
||||
|
@ -128,18 +128,18 @@ void get_time(WindowsHelpTimer* help_timer, FILETIME& current_time) {
|
||||
class RealTimeClock : public Clock {
|
||||
// Return a timestamp in milliseconds relative to some arbitrary source; the
|
||||
// source is fixed for this clock.
|
||||
virtual int64_t TimeInMilliseconds() {
|
||||
virtual int64_t TimeInMilliseconds() OVERRIDE {
|
||||
return TickTime::MillisecondTimestamp();
|
||||
}
|
||||
|
||||
// Return a timestamp in microseconds relative to some arbitrary source; the
|
||||
// source is fixed for this clock.
|
||||
virtual int64_t TimeInMicroseconds() {
|
||||
virtual int64_t TimeInMicroseconds() OVERRIDE {
|
||||
return TickTime::MicrosecondTimestamp();
|
||||
}
|
||||
|
||||
// Retrieve an NTP absolute timestamp in seconds and fractions of a second.
|
||||
virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) {
|
||||
virtual void CurrentNtp(uint32_t& seconds, uint32_t& fractions) OVERRIDE {
|
||||
timeval tv = CurrentTimeVal();
|
||||
double microseconds_in_seconds;
|
||||
Adjust(tv, &seconds, µseconds_in_seconds);
|
||||
@ -148,7 +148,7 @@ class RealTimeClock : public Clock {
|
||||
}
|
||||
|
||||
// Retrieve an NTP absolute timestamp in milliseconds.
|
||||
virtual int64_t CurrentNtpInMilliseconds() {
|
||||
virtual int64_t CurrentNtpInMilliseconds() OVERRIDE {
|
||||
timeval tv = CurrentTimeVal();
|
||||
uint32_t seconds;
|
||||
double microseconds_in_seconds;
|
||||
@ -184,7 +184,7 @@ class WindowsRealTimeClock : public RealTimeClock {
|
||||
virtual ~WindowsRealTimeClock() {}
|
||||
|
||||
protected:
|
||||
timeval CurrentTimeVal() const {
|
||||
virtual timeval CurrentTimeVal() const OVERRIDE {
|
||||
const uint64_t FILETIME_1970 = 0x019db1ded53e8000;
|
||||
|
||||
FILETIME StartTime;
|
||||
@ -217,7 +217,7 @@ class UnixRealTimeClock : public RealTimeClock {
|
||||
virtual ~UnixRealTimeClock() {}
|
||||
|
||||
protected:
|
||||
timeval CurrentTimeVal() const {
|
||||
virtual timeval CurrentTimeVal() const OVERRIDE {
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
tz.tz_minuteswest = 0;
|
||||
|
@ -14,18 +14,20 @@
|
||||
#include <pthread.h>
|
||||
|
||||
#include "webrtc/system_wrappers/interface/condition_variable_wrapper.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
class ConditionVariablePosix : public ConditionVariableWrapper {
|
||||
public:
|
||||
static ConditionVariableWrapper* Create();
|
||||
~ConditionVariablePosix();
|
||||
virtual ~ConditionVariablePosix();
|
||||
|
||||
void SleepCS(CriticalSectionWrapper& crit_sect);
|
||||
bool SleepCS(CriticalSectionWrapper& crit_sect, unsigned long max_time_in_ms);
|
||||
void Wake();
|
||||
void WakeAll();
|
||||
virtual void SleepCS(CriticalSectionWrapper& crit_sect) OVERRIDE;
|
||||
virtual bool SleepCS(CriticalSectionWrapper& crit_sect,
|
||||
unsigned long max_time_in_ms) OVERRIDE;
|
||||
virtual void Wake() OVERRIDE;
|
||||
virtual void WakeAll() OVERRIDE;
|
||||
|
||||
private:
|
||||
ConditionVariablePosix();
|
||||
|
@ -23,8 +23,8 @@ class CriticalSectionPosix : public CriticalSectionWrapper {
|
||||
|
||||
virtual ~CriticalSectionPosix();
|
||||
|
||||
virtual void Enter();
|
||||
virtual void Leave();
|
||||
virtual void Enter() OVERRIDE;
|
||||
virtual void Leave() OVERRIDE;
|
||||
|
||||
private:
|
||||
pthread_mutex_t mutex_;
|
||||
|
@ -31,12 +31,12 @@ class EventPosix : public EventWrapper {
|
||||
|
||||
virtual ~EventPosix();
|
||||
|
||||
virtual EventTypeWrapper Wait(unsigned long max_time);
|
||||
virtual bool Set();
|
||||
virtual bool Reset();
|
||||
virtual EventTypeWrapper Wait(unsigned long max_time) OVERRIDE;
|
||||
virtual bool Set() OVERRIDE;
|
||||
virtual bool Reset() OVERRIDE;
|
||||
|
||||
virtual bool StartTimer(bool periodic, unsigned long time);
|
||||
virtual bool StopTimer();
|
||||
virtual bool StartTimer(bool periodic, unsigned long time) OVERRIDE;
|
||||
virtual bool StopTimer() OVERRIDE;
|
||||
|
||||
private:
|
||||
EventPosix();
|
||||
|
@ -26,23 +26,23 @@ class FileWrapperImpl : public FileWrapper {
|
||||
virtual ~FileWrapperImpl();
|
||||
|
||||
virtual int FileName(char* file_name_utf8,
|
||||
size_t size) const;
|
||||
size_t size) const OVERRIDE;
|
||||
|
||||
virtual bool Open() const;
|
||||
virtual bool Open() const OVERRIDE;
|
||||
|
||||
virtual int OpenFile(const char* file_name_utf8,
|
||||
bool read_only,
|
||||
bool loop = false,
|
||||
bool text = false);
|
||||
bool text = false) OVERRIDE;
|
||||
|
||||
virtual int CloseFile();
|
||||
virtual int SetMaxFileSize(size_t bytes);
|
||||
virtual int Flush();
|
||||
virtual int CloseFile() OVERRIDE;
|
||||
virtual int SetMaxFileSize(size_t bytes) OVERRIDE;
|
||||
virtual int Flush() OVERRIDE;
|
||||
|
||||
virtual int Read(void* buf, int length);
|
||||
virtual bool Write(const void* buf, int length);
|
||||
virtual int WriteText(const char* format, ...);
|
||||
virtual int Rewind();
|
||||
virtual int Read(void* buf, int length) OVERRIDE;
|
||||
virtual bool Write(const void* buf, int length) OVERRIDE;
|
||||
virtual int WriteText(const char* format, ...) OVERRIDE;
|
||||
virtual int Rewind() OVERRIDE;
|
||||
|
||||
private:
|
||||
int CloseFileImpl();
|
||||
|
@ -12,6 +12,7 @@
|
||||
#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_GENERIC_H_
|
||||
|
||||
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
namespace webrtc {
|
||||
|
||||
@ -23,11 +24,11 @@ class RWLockGeneric : public RWLockWrapper {
|
||||
RWLockGeneric();
|
||||
virtual ~RWLockGeneric();
|
||||
|
||||
virtual void AcquireLockExclusive();
|
||||
virtual void ReleaseLockExclusive();
|
||||
virtual void AcquireLockExclusive() OVERRIDE;
|
||||
virtual void ReleaseLockExclusive() OVERRIDE;
|
||||
|
||||
virtual void AcquireLockShared();
|
||||
virtual void ReleaseLockShared();
|
||||
virtual void AcquireLockShared() OVERRIDE;
|
||||
virtual void ReleaseLockShared() OVERRIDE;
|
||||
|
||||
private:
|
||||
CriticalSectionWrapper* critical_section_;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#define WEBRTC_SYSTEM_WRAPPERS_SOURCE_RW_LOCK_POSIX_H_
|
||||
|
||||
#include "webrtc/system_wrappers/interface/rw_lock_wrapper.h"
|
||||
#include "webrtc/typedefs.h"
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
@ -22,11 +23,11 @@ class RWLockPosix : public RWLockWrapper {
|
||||
static RWLockPosix* Create();
|
||||
virtual ~RWLockPosix();
|
||||
|
||||
virtual void AcquireLockExclusive();
|
||||
virtual void ReleaseLockExclusive();
|
||||
virtual void AcquireLockExclusive() OVERRIDE;
|
||||
virtual void ReleaseLockExclusive() OVERRIDE;
|
||||
|
||||
virtual void AcquireLockShared();
|
||||
virtual void ReleaseLockShared();
|
||||
virtual void AcquireLockShared() OVERRIDE;
|
||||
virtual void ReleaseLockShared() OVERRIDE;
|
||||
|
||||
private:
|
||||
RWLockPosix();
|
||||
|
@ -28,4 +28,9 @@ ThreadWrapper* ThreadWrapper::CreateThread(ThreadRunFunction func,
|
||||
#endif
|
||||
}
|
||||
|
||||
bool ThreadWrapper::SetAffinity(const int* processor_numbers,
|
||||
const unsigned int amount_of_processors) {
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace webrtc
|
||||
|
@ -30,15 +30,15 @@ class ThreadPosix : public ThreadWrapper {
|
||||
|
||||
ThreadPosix(ThreadRunFunction func, ThreadObj obj, ThreadPriority prio,
|
||||
const char* thread_name);
|
||||
~ThreadPosix();
|
||||
virtual ~ThreadPosix();
|
||||
|
||||
// From ThreadWrapper.
|
||||
virtual void SetNotAlive();
|
||||
virtual bool Start(unsigned int& id);
|
||||
virtual void SetNotAlive() OVERRIDE;
|
||||
virtual bool Start(unsigned int& id) OVERRIDE;
|
||||
// Not implemented on Mac.
|
||||
virtual bool SetAffinity(const int* processor_numbers,
|
||||
unsigned int amount_of_processors);
|
||||
virtual bool Stop();
|
||||
unsigned int amount_of_processors) OVERRIDE;
|
||||
virtual bool Stop() OVERRIDE;
|
||||
|
||||
void Run();
|
||||
|
||||
|
@ -23,10 +23,11 @@ class TracePosix : public TraceImpl {
|
||||
|
||||
// This method can be called on several different threads different from
|
||||
// the creating thread.
|
||||
virtual int32_t AddTime(char* trace_message, const TraceLevel level) const;
|
||||
virtual int32_t AddTime(char* trace_message, const TraceLevel level) const
|
||||
OVERRIDE;
|
||||
|
||||
virtual int32_t AddBuildInfo(char* trace_message) const;
|
||||
virtual int32_t AddDateTimeInfo(char* trace_message) const;
|
||||
virtual int32_t AddBuildInfo(char* trace_message) const OVERRIDE;
|
||||
virtual int32_t AddDateTimeInfo(char* trace_message) const OVERRIDE;
|
||||
|
||||
private:
|
||||
volatile mutable uint32_t prev_api_tick_count_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user