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

Side by Side Diff: chrome/utility/media_galleries/pmp_column_reader.cc

Issue 810283003: replace COMPILE_ASSERT with static_assert in chrome/[r-z]*/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « chrome/tools/profile_reset/jtl_parser_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/utility/media_galleries/pmp_column_reader.h" 5 #include "chrome/utility/media_galleries/pmp_column_reader.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "base/files/file.h" 9 #include "base/files/file.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/threading/thread_restrictions.h" 12 #include "base/threading/thread_restrictions.h"
13 13
14 namespace picasa { 14 namespace picasa {
15 15
16 namespace { 16 namespace {
17 17
18 COMPILE_ASSERT(sizeof(double) == 8, double_must_be_8_bytes_long); 18 static_assert(sizeof(double) == 8, "double must be 8 bytes long");
19 const int64 kPmpMaxFilesize = 50*1024*1024; // Arbitrary maximum of 50 MB. 19 const int64 kPmpMaxFilesize = 50*1024*1024; // Arbitrary maximum of 50 MB.
20 20
21 } // namespace 21 } // namespace
22 22
23 PmpColumnReader::PmpColumnReader() 23 PmpColumnReader::PmpColumnReader()
24 : length_(0), 24 : length_(0),
25 field_type_(PMP_TYPE_INVALID), 25 field_type_(PMP_TYPE_INVALID),
26 rows_read_(0) {} 26 rows_read_(0) {}
27 27
28 PmpColumnReader::~PmpColumnReader() {} 28 PmpColumnReader::~PmpColumnReader() {}
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 196
197 strings_.push_back(reinterpret_cast<const char*>(data_cursor)); 197 strings_.push_back(reinterpret_cast<const char*>(data_cursor));
198 data_cursor += length_in_bytes; 198 data_cursor += length_in_bytes;
199 bytes_parsed += length_in_bytes; 199 bytes_parsed += length_in_bytes;
200 } 200 }
201 201
202 return bytes_parsed - kPmpHeaderSize; 202 return bytes_parsed - kPmpHeaderSize;
203 } 203 }
204 204
205 } // namespace picasa 205 } // namespace picasa
OLDNEW
« no previous file with comments | « chrome/tools/profile_reset/jtl_parser_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698