Skip to content

Commit 5c2073c

Browse files
amabluea-maurice
authored andcommitted
Fixed implicit fallthroughs in switch statement.
PiperOrigin-RevId: 312762955
1 parent f9e1426 commit 5c2073c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

database/src/desktop/persistence/level_db_persistence_storage_engine.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ class ChildrenAtPath {
124124
};
125125

126126
// Call the given function on each leaf of the given variant.
127+
// Returns true on success, false if there was a failure. Failure can mean that
128+
// the callback reported a failure by returning false, or that it encountered a
129+
// type it doesn't know how to handle (vector, blobs).
127130
template <typename Func>
128131
bool CallOnEachLeaf(const Path& path, const Variant& variant,
129132
const Func& func) {
@@ -156,11 +159,13 @@ bool CallOnEachLeaf(const Path& path, const Variant& variant,
156159
// We expect for vectors to have been converted to maps by the time they
157160
// reach this point.
158161
assert(false);
162+
return false;
159163
}
160164
case Variant::kTypeStaticBlob:
161165
case Variant::kTypeMutableBlob: {
162166
// Blobs are not supported types.
163167
assert(false);
168+
return false;
164169
}
165170
default: {
166171
// All types have cases. If we reach this point something has gone wrong.

0 commit comments

Comments
 (0)