summaryrefslogtreecommitdiff
path: root/system_wrappers/source
diff options
context:
space:
mode:
authorpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-08-01 17:26:15 +0000
committerpbos@webrtc.org <pbos@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2013-08-01 17:26:15 +0000
commit7affcd2236a1e8e9d5d70f21dc7a5c385f509d37 (patch)
tree09bb9d6c474bb73639156ceeadd9b359228c37eb /system_wrappers/source
parent7b2147f8975308f753380cf0248b84a733970a10 (diff)
downloadwebrtc-7affcd2236a1e8e9d5d70f21dc7a5c385f509d37.tar.gz
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/webrtc@4464 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'system_wrappers/source')
-rw-r--r--system_wrappers/source/clock.cc12
-rw-r--r--system_wrappers/source/condition_variable_posix.h12
-rw-r--r--system_wrappers/source/critical_section_posix.h4
-rw-r--r--system_wrappers/source/event_posix.h10
-rw-r--r--system_wrappers/source/file_impl.h20
-rw-r--r--system_wrappers/source/rw_lock_generic.h9
-rw-r--r--system_wrappers/source/rw_lock_posix.h9
-rw-r--r--system_wrappers/source/thread.cc5
-rw-r--r--system_wrappers/source/thread_posix.h10
-rw-r--r--system_wrappers/source/trace_posix.h7
10 files changed, 54 insertions, 44 deletions
diff --git a/system_wrappers/source/clock.cc b/system_wrappers/source/clock.cc
index c74c7471..7ef6c66f 100644
--- a/system_wrappers/source/clock.cc
+++ b/system_wrappers/source/clock.cc
@@ -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, &microseconds_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;
diff --git a/system_wrappers/source/condition_variable_posix.h b/system_wrappers/source/condition_variable_posix.h
index 6e69746e..a014a3b7 100644
--- a/system_wrappers/source/condition_variable_posix.h
+++ b/system_wrappers/source/condition_variable_posix.h
@@ -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();
diff --git a/system_wrappers/source/critical_section_posix.h b/system_wrappers/source/critical_section_posix.h
index 6a0426c0..a5ec3673 100644
--- a/system_wrappers/source/critical_section_posix.h
+++ b/system_wrappers/source/critical_section_posix.h
@@ -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_;
diff --git a/system_wrappers/source/event_posix.h b/system_wrappers/source/event_posix.h
index 4a055a0d..5fbe0613 100644
--- a/system_wrappers/source/event_posix.h
+++ b/system_wrappers/source/event_posix.h
@@ -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();
diff --git a/system_wrappers/source/file_impl.h b/system_wrappers/source/file_impl.h
index 5dbbcfb0..8cc0979c 100644
--- a/system_wrappers/source/file_impl.h
+++ b/system_wrappers/source/file_impl.h
@@ -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();
diff --git a/system_wrappers/source/rw_lock_generic.h b/system_wrappers/source/rw_lock_generic.h
index cd5848f4..dd69f52e 100644
--- a/system_wrappers/source/rw_lock_generic.h
+++ b/system_wrappers/source/rw_lock_generic.h
@@ -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_;
diff --git a/system_wrappers/source/rw_lock_posix.h b/system_wrappers/source/rw_lock_posix.h
index a56ae12d..6ce2b2d7 100644
--- a/system_wrappers/source/rw_lock_posix.h
+++ b/system_wrappers/source/rw_lock_posix.h
@@ -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();
diff --git a/system_wrappers/source/thread.cc b/system_wrappers/source/thread.cc
index 6f023f86..b5ee7a54 100644
--- a/system_wrappers/source/thread.cc
+++ b/system_wrappers/source/thread.cc
@@ -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
diff --git a/system_wrappers/source/thread_posix.h b/system_wrappers/source/thread_posix.h
index bacf908a..c2025fd8 100644
--- a/system_wrappers/source/thread_posix.h
+++ b/system_wrappers/source/thread_posix.h
@@ -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();
diff --git a/system_wrappers/source/trace_posix.h b/system_wrappers/source/trace_posix.h
index ece936ad..2056c704 100644
--- a/system_wrappers/source/trace_posix.h
+++ b/system_wrappers/source/trace_posix.h
@@ -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_;