Add missing #include <algorithm> for std::min/std::max uses, and #include <limits> for std::numeric_limits<> (#7624)

This commit is contained in:
Even Rouault
2022-11-08 18:36:35 +01:00
committed by GitHub
parent 214cc94681
commit a22434e2a1
19 changed files with 32 additions and 5 deletions

View File

@@ -17,6 +17,8 @@
#ifndef FLATBUFFERS_BUFFER_H_
#define FLATBUFFERS_BUFFER_H_
#include <algorithm>
#include "flatbuffers/base.h"
namespace flatbuffers {

View File

@@ -17,6 +17,7 @@
#ifndef FLATBUFFERS_FLATBUFFER_BUILDER_H_
#define FLATBUFFERS_FLATBUFFER_BUILDER_H_
#include <algorithm>
#include <functional>
#include <initializer_list>

View File

@@ -17,6 +17,8 @@
#ifndef FLATBUFFERS_H_
#define FLATBUFFERS_H_
#include <algorithm>
// TODO: These includes are for mitigating the pains of users editing their
// source because they relied on flatbuffers.h to include everything for them.
#include "flatbuffers/array.h"

View File

@@ -17,6 +17,7 @@
#ifndef FLATBUFFERS_FLEXBUFFERS_H_
#define FLATBUFFERS_FLEXBUFFERS_H_
#include <algorithm>
#include <map>
// Used to select STL variant.
#include "flatbuffers/base.h"

View File

@@ -17,6 +17,7 @@
#ifndef FLATBUFFERS_IDL_H_
#define FLATBUFFERS_IDL_H_
#include <algorithm>
#include <functional>
#include <map>
#include <memory>

View File

@@ -31,6 +31,7 @@
# include <stdio.h>
#endif // FLATBUFFERS_PREFER_PRINTF
#include <limits>
#include <string>
namespace flatbuffers {

View File

@@ -17,6 +17,8 @@
#ifndef FLATBUFFERS_VECTOR_DOWNWARD_H_
#define FLATBUFFERS_VECTOR_DOWNWARD_H_
#include <algorithm>
#include "flatbuffers/base.h"
#include "flatbuffers/default_allocator.h"
#include "flatbuffers/detached_buffer.h"

View File

@@ -1,5 +1,6 @@
#include "annotated_binary_text_gen.h"
#include <algorithm>
#include <sstream>
#include <string>

View File

@@ -1,5 +1,6 @@
#include "binary_annotator.h"
#include <algorithm>
#include <limits>
#include <string>
#include <vector>

View File

@@ -16,6 +16,8 @@
#include "flatbuffers/flatc.h"
#include <algorithm>
#include <limits>
#include <list>
#include <sstream>

View File

@@ -16,6 +16,7 @@
// independent from idl_parser, since this code is not needed for most clients
#include <limits>
#include <string>
#include <unordered_set>

View File

@@ -16,6 +16,7 @@
// independent from idl_parser, since this code is not needed for most clients
#include <algorithm>
#include <sstream>
#include <string>

View File

@@ -14,7 +14,9 @@
* limitations under the License.
*/
#include <algorithm>
#include <iostream>
#include <limits>
#include "flatbuffers/code_generators.h"
#include "flatbuffers/idl.h"

View File

@@ -16,6 +16,8 @@
// independent from idl_parser, since this code is not needed for most clients
#include <algorithm>
#include "flatbuffers/flatbuffers.h"
#include "flatbuffers/flexbuffers.h"
#include "flatbuffers/idl.h"

View File

@@ -1,3 +1,5 @@
#include <limits>
#include "flexbuffers_test.h"
#include "flatbuffers/flexbuffers.h"

View File

@@ -1,3 +1,5 @@
#include <algorithm>
#include "fuzz_test.h"
#include "flatbuffers/flatbuffers.h"

View File

@@ -1,5 +1,6 @@
#include "monster_test.h"
#include <limits>
#include <vector>
#include "flatbuffers/flatbuffer_builder.h"

View File

@@ -1,6 +1,7 @@
#include "parser_test.h"
#include <cmath>
#include <limits>
#include <string>
#include "flatbuffers/idl.h"

View File

@@ -16,6 +16,7 @@
#include <stdint.h>
#include <cmath>
#include <limits>
#include <memory>
#include <string>