diff options
author | Mirko Bonadei <mbonadei@webrtc.org> | 2020-04-15 09:55:03 +0200 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-04-15 09:30:07 +0000 |
commit | f7f6870f1b6cafe86a3315481370924381c3661f (patch) | |
tree | 41cc87fd0526201f14ccd1e1a708313d61b57bb6 /rtc_base | |
parent | 3ebb6e93f4177ab9cbfa0af7a5d04e265efd5b4c (diff) | |
download | webrtc-f7f6870f1b6cafe86a3315481370924381c3661f.tar.gz |
Mark static const class/struct members as constexpr.
This change fixes declarations that have initial values but are
technically not definitions by marking them constexpr (which counts as a
definition).
Bug: None
Change-Id: Icbecf8d83faffa83b9f7e1ffe4d6ef3a3f0b0c2a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/173587
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#31073}
Diffstat (limited to 'rtc_base')
-rw-r--r-- | rtc_base/physical_socket_server.cc | 2 | ||||
-rw-r--r-- | rtc_base/rtc_certificate_generator_unittest.cc | 2 | ||||
-rw-r--r-- | rtc_base/thread_unittest.cc | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc index ed4d42ca74..080534af2c 100644 --- a/rtc_base/physical_socket_server.cc +++ b/rtc_base/physical_socket_server.cc @@ -969,7 +969,7 @@ class PosixSignalHandler { // POSIX only specifies 32 signals, but in principle the system might have // more and the programmer might choose to use them, so we size our array // for 128. - static const int kNumPosixSignals = 128; + static constexpr int kNumPosixSignals = 128; // There is just a single global instance. (Signal handlers do not get any // sort of user-defined void * parameter, so they can't access anything that diff --git a/rtc_base/rtc_certificate_generator_unittest.cc b/rtc_base/rtc_certificate_generator_unittest.cc index 959e65a4c4..2d6986a9ea 100644 --- a/rtc_base/rtc_certificate_generator_unittest.cc +++ b/rtc_base/rtc_certificate_generator_unittest.cc @@ -73,7 +73,7 @@ class RTCCertificateGeneratorTest : public ::testing::Test { : fixture_(new RefCountedObject<RTCCertificateGeneratorFixture>()) {} protected: - static const int kGenerationTimeoutMs = 10000; + static constexpr int kGenerationTimeoutMs = 10000; scoped_refptr<RTCCertificateGeneratorFixture> fixture_; }; diff --git a/rtc_base/thread_unittest.cc b/rtc_base/thread_unittest.cc index 91bea4f9b3..d53a387914 100644 --- a/rtc_base/thread_unittest.cc +++ b/rtc_base/thread_unittest.cc @@ -791,7 +791,7 @@ class GuardedAsyncInvokeTest : public ::testing::Test { } protected: - const static int kWaitTimeout = 1000; + constexpr static int kWaitTimeout = 1000; GuardedAsyncInvokeTest() : int_value_(0), expected_thread_(nullptr) {} int int_value_; |