Don't rely on webrtc/base/scoped_ptr.h to include stuff for you
webrtc/base/scoped_ptr.h doesn't need to include webrtc/base/common.h
anymore, but a couple of its users were relying on it to pull in other
things for them. Fix that, and remove the now really unnecessary
webrtc/base/common.h include.
R=andrew@webrtc.org, pthatcher@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/37169004
Cr-Commit-Position: refs/heads/master@{#8333}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8333 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index dbe7b1a..ddab0fb 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -13,6 +13,7 @@
#include <string.h>
+#include "webrtc/base/common.h"
#include "webrtc/base/scoped_ptr.h"
namespace rtc {
diff --git a/webrtc/base/messagedigest.cc b/webrtc/base/messagedigest.cc
index dc3e100..8af60d9 100644
--- a/webrtc/base/messagedigest.cc
+++ b/webrtc/base/messagedigest.cc
@@ -12,6 +12,7 @@
#include <string.h>
+#include "webrtc/base/basictypes.h"
#include "webrtc/base/sslconfig.h"
#if SSL_USE_OPENSSL
#include "webrtc/base/openssldigest.h"
diff --git a/webrtc/base/scoped_ptr.h b/webrtc/base/scoped_ptr.h
index 95e7f49..36ca326 100644
--- a/webrtc/base/scoped_ptr.h
+++ b/webrtc/base/scoped_ptr.h
@@ -104,7 +104,6 @@
#include <algorithm> // For std::swap().
-#include "webrtc/base/common.h"
#include "webrtc/base/constructormagic.h"
#include "webrtc/base/move.h"
#include "webrtc/base/template_util.h"
diff --git a/webrtc/base/taskparent.cc b/webrtc/base/taskparent.cc
index edc146f..97cbc9d 100644
--- a/webrtc/base/taskparent.cc
+++ b/webrtc/base/taskparent.cc
@@ -12,6 +12,7 @@
#include "webrtc/base/taskparent.h"
+#include "webrtc/base/common.h"
#include "webrtc/base/task.h"
#include "webrtc/base/taskrunner.h"
diff --git a/webrtc/modules/audio_device/mac/audio_device_mac.cc b/webrtc/modules/audio_device/mac/audio_device_mac.cc
index 3f39cdf..4e4ea12 100644
--- a/webrtc/modules/audio_device/mac/audio_device_mac.cc
+++ b/webrtc/modules/audio_device/mac/audio_device_mac.cc
@@ -8,6 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
+#include "webrtc/base/arraysize.h"
#include "webrtc/base/checks.h"
#include "webrtc/modules/audio_device/audio_device_config.h"
#include "webrtc/modules/audio_device/audio_device_utility.h"
@@ -3213,7 +3214,7 @@
bool key_down = false;
// Loop through all Mac virtual key constant values.
for (unsigned int key_index = 0;
- key_index < ARRAY_SIZE(prev_key_state_);
+ key_index < arraysize(prev_key_state_);
++key_index) {
bool keyState = CGEventSourceKeyState(
kCGEventSourceStateHIDSystemState,
diff --git a/webrtc/modules/utility/source/process_thread_impl_unittest.cc b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
index a45d5b2..c8b03a6 100644
--- a/webrtc/modules/utility/source/process_thread_impl_unittest.cc
+++ b/webrtc/modules/utility/source/process_thread_impl_unittest.cc
@@ -155,7 +155,7 @@
// thereof), can make the test run in "0"ms time.
EXPECT_GE(called_time, start_time);
// Check for an acceptable range.
- uint32 diff = called_time - start_time;
+ uint32_t diff = called_time - start_time;
EXPECT_GE(diff, milliseconds - 15);
EXPECT_LT(diff, milliseconds + 15);
}
@@ -247,7 +247,7 @@
ASSERT_GT(start_time, 0);
ASSERT_GT(called_time, 0);
EXPECT_GE(called_time, start_time);
- uint32 diff = called_time - start_time;
+ uint32_t diff = called_time - start_time;
// We should have been called back much quicker than 1sec.
EXPECT_LE(diff, 100u);
}