| 93 | } |
| 94 | |
| 95 | static bool GetLevel(Slice* input, int* level) { |
| 96 | uint32_t v; |
| 97 | if (GetVarint32(input, &v) && v < config::kNumLevels) { |
| 98 | *level = v; |
| 99 | return true; |
| 100 | } else { |
| 101 | return false; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | Status VersionEdit::DecodeFrom(const Slice& src) { |
| 106 | Clear(); |
no test coverage detected