![]() |
|
|||
File indexing completed on 2025-08-27 09:30:25
0001 /* 0002 * Copyright 2022 Google Inc. All rights reserved. 0003 * 0004 * Licensed under the Apache License, Version 2.0 (the "License"); 0005 * you may not use this file except in compliance with the License. 0006 * You may obtain a copy of the License at 0007 * 0008 * http://www.apache.org/licenses/LICENSE-2.0 0009 * 0010 * Unless required by applicable law or agreed to in writing, software 0011 * distributed under the License is distributed on an "AS IS" BASIS, 0012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0013 * See the License for the specific language governing permissions and 0014 * limitations under the License. 0015 */ 0016 0017 #ifndef FLATBUFFERS_FLEX_FLAT_UTIL_H_ 0018 #define FLATBUFFERS_FLEX_FLAT_UTIL_H_ 0019 0020 #include "flatbuffers/flatbuffers.h" 0021 #include "flatbuffers/flexbuffers.h" 0022 0023 namespace flexbuffers { 0024 0025 // Verifies the `nested` flexbuffer within a flatbuffer vector is valid. 0026 inline bool VerifyNestedFlexBuffer( 0027 const flatbuffers::Vector<uint8_t> *const nested, 0028 flatbuffers::Verifier &verifier) { 0029 if (!nested) return true; 0030 return verifier.Check(flexbuffers::VerifyBuffer( 0031 nested->data(), nested->size(), verifier.GetFlexReuseTracker())); 0032 } 0033 0034 } // namespace flexbuffers 0035 0036 #endif // FLATBUFFERS_FLEX_FLAT_UTIL_H_
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |