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

Unified Diff: content/browser/indexed_db/indexed_db_leveldb_coding.cc

Issue 202863004: Fix "unreachable code" warnings (MSVC warning 4702) in content/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/renderer_host/input/gesture_event_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_leveldb_coding.cc
===================================================================
--- content/browser/indexed_db/indexed_db_leveldb_coding.cc (revision 257821)
+++ content/browser/indexed_db/indexed_db_leveldb_coding.cc (working copy)
@@ -310,14 +310,6 @@
size_t previous_size = into->size();
DCHECK(value.IsValid());
switch (value.type()) {
- case WebIDBKeyTypeNull:
- case WebIDBKeyTypeInvalid:
- case WebIDBKeyTypeMin:
- default: {
- NOTREACHED();
- EncodeByte(kIndexedDBKeyNullTypeByte, into);
- return;
- }
case WebIDBKeyTypeArray: {
EncodeByte(kIndexedDBKeyArrayTypeByte, into);
size_t length = value.array().size();
@@ -327,33 +319,34 @@
DCHECK_GT(into->size(), previous_size);
return;
}
- case WebIDBKeyTypeBinary: {
+ case WebIDBKeyTypeBinary:
EncodeByte(kIndexedDBKeyBinaryTypeByte, into);
EncodeBinary(value.binary(), into);
DCHECK_GT(into->size(), previous_size);
return;
- }
- case WebIDBKeyTypeString: {
+ case WebIDBKeyTypeString:
EncodeByte(kIndexedDBKeyStringTypeByte, into);
EncodeStringWithLength(value.string(), into);
DCHECK_GT(into->size(), previous_size);
return;
- }
- case WebIDBKeyTypeDate: {
+ case WebIDBKeyTypeDate:
EncodeByte(kIndexedDBKeyDateTypeByte, into);
EncodeDouble(value.date(), into);
DCHECK_EQ(9u, static_cast<size_t>(into->size() - previous_size));
return;
- }
- case WebIDBKeyTypeNumber: {
+ case WebIDBKeyTypeNumber:
EncodeByte(kIndexedDBKeyNumberTypeByte, into);
EncodeDouble(value.number(), into);
DCHECK_EQ(9u, static_cast<size_t>(into->size() - previous_size));
return;
- }
+ case WebIDBKeyTypeNull:
+ case WebIDBKeyTypeInvalid:
+ case WebIDBKeyTypeMin:
+ default:
+ NOTREACHED();
+ EncodeByte(kIndexedDBKeyNullTypeByte, into);
+ return;
}
-
- NOTREACHED();
}
void EncodeIDBKeyPath(const IndexedDBKeyPath& value, std::string* into) {
« no previous file with comments | « content/browser/gpu/compositor_util.cc ('k') | content/browser/renderer_host/input/gesture_event_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698