Adding constness.
Make a few member variables in the Transport class officially const so that it's clear that locking isn't needed for access. There are getters for some of these (e.g. content_name()) that don't have locking or checking, so making the variables const is at least a way to guard against regressions. Also making the clock_ member in overuse_frame_detector.h const for clarity that it doesn't require a lock for access. No code change. Review URL: https://webrtc-codereview.appspot.com/35949004 Cr-Commit-Position: refs/heads/master@{#8186} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8186 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
664ccb7d8d
commit
a907e01c63
@ -413,11 +413,11 @@ class Transport : public rtc::MessageHandler,
|
||||
// Sends SignalCompleted if we are now in that state.
|
||||
void MaybeCompleted_w();
|
||||
|
||||
rtc::Thread* signaling_thread_;
|
||||
rtc::Thread* worker_thread_;
|
||||
std::string content_name_;
|
||||
std::string type_;
|
||||
PortAllocator* allocator_;
|
||||
rtc::Thread* const signaling_thread_;
|
||||
rtc::Thread* const worker_thread_;
|
||||
const std::string content_name_;
|
||||
const std::string type_;
|
||||
PortAllocator* const allocator_;
|
||||
bool destroyed_;
|
||||
TransportState readable_;
|
||||
TransportState writable_;
|
||||
|
@ -126,7 +126,7 @@ class OveruseFrameDetector : public Module {
|
||||
|
||||
CpuOveruseOptions options_ GUARDED_BY(crit_);
|
||||
|
||||
Clock* clock_;
|
||||
Clock* const clock_;
|
||||
int64_t next_process_time_;
|
||||
int64_t num_process_times_ GUARDED_BY(crit_);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user