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

Unified Diff: content/child/indexed_db/indexed_db_key_builders.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
Index: content/child/indexed_db/indexed_db_key_builders.cc
===================================================================
--- content/child/indexed_db/indexed_db_key_builders.cc (revision 257734)
+++ content/child/indexed_db/indexed_db_key_builders.cc (working copy)
@@ -45,25 +45,29 @@
switch (key.keyType()) {
case WebIDBKeyTypeArray:
return IndexedDBKey(CopyKeyArray(key));
+
jam 2014/03/19 16:44:36 ditto
Peter Kasting 2014/03/19 21:10:57 Done.
case WebIDBKeyTypeBinary:
return IndexedDBKey(
std::string(key.binary().data(), key.binary().size()));
+
case WebIDBKeyTypeString:
return IndexedDBKey(key.string());
+
case WebIDBKeyTypeDate:
return IndexedDBKey(key.date(), WebIDBKeyTypeDate);
+
case WebIDBKeyTypeNumber:
return IndexedDBKey(key.number(), WebIDBKeyTypeNumber);
+
case WebIDBKeyTypeNull:
case WebIDBKeyTypeInvalid:
return IndexedDBKey(key.keyType());
+
case WebIDBKeyTypeMin:
default:
NOTREACHED();
return IndexedDBKey();
}
- NOTREACHED();
- return IndexedDBKey();
}
WebIDBKey WebIDBKeyBuilder::Build(const IndexedDBKey& key) {
@@ -76,25 +80,30 @@
}
return WebIDBKey::createArray(web_array);
}
+
case WebIDBKeyTypeBinary:
return WebIDBKey::createBinary(key.binary());
+
case WebIDBKeyTypeString:
return WebIDBKey::createString(key.string());
+
case WebIDBKeyTypeDate:
return WebIDBKey::createDate(key.date());
+
case WebIDBKeyTypeNumber:
return WebIDBKey::createNumber(key.number());
+
case WebIDBKeyTypeInvalid:
return WebIDBKey::createInvalid();
+
case WebIDBKeyTypeNull:
return WebIDBKey::createNull();
+
case WebIDBKeyTypeMin:
default:
NOTREACHED();
return WebIDBKey::createInvalid();
}
- NOTREACHED();
- return WebIDBKey::createInvalid();
}
IndexedDBKeyRange IndexedDBKeyRangeBuilder::Build(
@@ -111,13 +120,17 @@
switch (key_path.keyPathType()) {
case blink::WebIDBKeyPathTypeString:
return IndexedDBKeyPath(key_path.string());
+
case blink::WebIDBKeyPathTypeArray:
return IndexedDBKeyPath(CopyArray(key_path.array()));
+
case blink::WebIDBKeyPathTypeNull:
return IndexedDBKeyPath();
+
+ default:
+ NOTREACHED();
+ return IndexedDBKeyPath();
}
- NOTREACHED();
- return IndexedDBKeyPath();
}
blink::WebIDBKeyPath WebIDBKeyPathBuilder::Build(
@@ -125,13 +138,17 @@
switch (key_path.type()) {
case blink::WebIDBKeyPathTypeString:
return blink::WebIDBKeyPath::create(WebString(key_path.string()));
+
case blink::WebIDBKeyPathTypeArray:
return blink::WebIDBKeyPath::create(CopyArray(key_path.array()));
+
case blink::WebIDBKeyPathTypeNull:
return blink::WebIDBKeyPath::createNull();
+
+ default:
+ NOTREACHED();
+ return blink::WebIDBKeyPath::createNull();
}
- NOTREACHED();
- return blink::WebIDBKeyPath::createNull();
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698