Commit ef8bbedc authored by Avi Drissman's avatar Avi Drissman Committed by Commit Bot

Use base::size rather than arraysize in ppapi/.

This is purely a mechanical change; there is no intended behavior change.

BUG=837308
TBR=raymes@chromium.org

Change-Id: I72d85808c431221bac3e8f392f4be78c1856c401
Reviewed-on: https://chromium-review.googlesource.com/c/1390418Reviewed-by: default avatarAvi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618841}
parent a42dff19
......@@ -8,7 +8,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/macros.h"
#include "base/stl_util.h"
#include "ppapi/c/pp_bool.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/proxy/error_conversion.h"
......@@ -36,10 +36,10 @@ TCPSocketResourceBase::TCPSocketResourceBase(Connection connection,
version_(version) {
local_addr_.size = 0;
memset(local_addr_.data, 0,
arraysize(local_addr_.data) * sizeof(*local_addr_.data));
base::size(local_addr_.data) * sizeof(*local_addr_.data));
remote_addr_.size = 0;
memset(remote_addr_.data, 0,
arraysize(remote_addr_.data) * sizeof(*remote_addr_.data));
base::size(remote_addr_.data) * sizeof(*remote_addr_.data));
}
TCPSocketResourceBase::TCPSocketResourceBase(
......
......@@ -8,8 +8,8 @@
#include <cctype>
#include "base/macros.h"
#include "base/numerics/safe_conversions.h"
#include "base/stl_util.h"
namespace ppapi {
......@@ -27,7 +27,7 @@ const PP_Flash_Clipboard_Format kPredefinedFormats[] = {
// The first custom format ID will be the ID after that max value in
// PP_Flash_Clipboard_Format.
const size_t kFirstCustomFormat = arraysize(kPredefinedFormats);
const size_t kFirstCustomFormat = base::size(kPredefinedFormats);
// Checks the validity of the given format name.
bool IsValidFormatName(const std::string& format_name) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment