aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/google/protobuf/descriptor.cc
diff options
context:
space:
mode:
authorGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-07-31 00:24:48 +0000
committerGravatar jieluo@google.com <jieluo@google.com@630680e5-0e50-0410-840e-4b1c322b438d>2014-07-31 00:24:48 +0000
commit7ee0f3edc7fe125b5c65865b168c296731f2a567 (patch)
tree6c0cef0dbe511f4f9c5d7bda53af316b6355ea43 /src/google/protobuf/descriptor.cc
parentb7aebe40998d9a2526d6edf3f662d5b517dfdd1c (diff)
change some files to pass MSVC 2013
Diffstat (limited to 'src/google/protobuf/descriptor.cc')
-rw-r--r--src/google/protobuf/descriptor.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/google/protobuf/descriptor.cc b/src/google/protobuf/descriptor.cc
index 706e4bf9..d57b701f 100644
--- a/src/google/protobuf/descriptor.cc
+++ b/src/google/protobuf/descriptor.cc
@@ -204,9 +204,11 @@ struct PointerIntegerPairHash {
return reinterpret_cast<intptr_t>(p.first) * ((1 << 16) - 1) + p.second;
}
+#ifdef _MSC_VER
// Used only by MSVC and platforms where hash_map is not available.
static const size_t bucket_size = 4;
static const size_t min_buckets = 8;
+#endif
inline bool operator()(const PairType& a, const PairType& b) const {
return a.first < b.first ||
(a.first == b.first && a.second < b.second);
@@ -226,6 +228,10 @@ struct PointerStringPairHash {
}
// Used only by MSVC and platforms where hash_map is not available.
+ // These two lines produce unused warning, but do not delete them
+ // unless hash_map is available on MSVC and platforms.
+ static const size_t bucket_size = 4;
+ static const size_t min_buckets = 8;
inline bool operator()(const PointerStringPair& a,
const PointerStringPair& b) const {
if (a.first < b.first) return true;