Fix Windows build after 8f0636288a0e

Clang, GCC, and MSVS 2017 were fine with a “constexpr” definition
corresponding to a class-scope “static const” declaration, but MSVS 2015
is not.

Change-Id: I8c80c6e62d1a312bad161db98e584be225b70bbf
Reviewed-on: https://chromium-review.googlesource.com/592644
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Mark Mentovai 2017-07-28 21:21:13 -04:00
parent 8f0636288a
commit b653f86153
2 changed files with 2 additions and 6 deletions

View File

@ -16,8 +16,6 @@
#include <stdint.h>
#include <limits>
#include "base/logging.h"
#include "util/file/file_writer.h"
#include "util/numeric/safe_assignment.h"
@ -82,9 +80,6 @@ void MinidumpWritable::RegisterLocationDescriptor(
registered_location_descriptors_.push_back(location_descriptor);
}
constexpr size_t MinidumpWritable::kInvalidSize =
std::numeric_limits<size_t>::max();
MinidumpWritable::MinidumpWritable()
: registered_rvas_(),
registered_location_descriptors_(),

View File

@ -19,6 +19,7 @@
#include <dbghelp.h>
#include <sys/types.h>
#include <limits>
#include <vector>
#include "base/macros.h"
@ -134,7 +135,7 @@ class MinidumpWritable {
//! \brief A size value used to signal failure by methods that return
//! `size_t`.
static const size_t kInvalidSize;
static constexpr size_t kInvalidSize = std::numeric_limits<size_t>::max();
MinidumpWritable();