Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(553)

Side by Side Diff: net/quic/quic_fec_group_interface.cc

Issue 1535363003: Switch to standard integer types in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: stddef Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/quic_fec_group_interface.h ('k') | net/quic/quic_fec_group_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_fec_group_interface.h" 5 #include "net/quic/quic_fec_group_interface.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/basictypes.h"
10 #include "base/logging.h" 9 #include "base/logging.h"
11 #include "base/stl_util.h" 10 #include "base/stl_util.h"
12 11
13 namespace net { 12 namespace net {
14 13
15 void QuicFecGroupInterface::XorBuffers(const char* input, 14 void QuicFecGroupInterface::XorBuffers(const char* input,
16 size_t size_in_bytes, 15 size_t size_in_bytes,
17 char* output) { 16 char* output) {
18 #if defined(__i386__) || defined(__x86_64__) 17 #if defined(__i386__) || defined(__x86_64__)
19 // On x86, alignment is not required and casting bytes to words is safe. 18 // On x86, alignment is not required and casting bytes to words is safe.
(...skipping 21 matching lines...) Expand all
41 #else 40 #else
42 // On ARM and most other plaforms, the code above could fail due to the 41 // On ARM and most other plaforms, the code above could fail due to the
43 // alignment errors. Stick to byte-by-byte comparison. 42 // alignment errors. Stick to byte-by-byte comparison.
44 for (size_t offset = 0; offset < size_in_bytes; offset++) { 43 for (size_t offset = 0; offset < size_in_bytes; offset++) {
45 output[offset] ^= input[offset]; 44 output[offset] ^= input[offset];
46 } 45 }
47 #endif /* defined(__i386__) || defined(__x86_64__) */ 46 #endif /* defined(__i386__) || defined(__x86_64__) */
48 } 47 }
49 48
50 } // namespace net 49 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_fec_group_interface.h ('k') | net/quic/quic_fec_group_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698