mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-07 05:47:36 +00:00
Flatbuffers Version 23.1.20 (#7794)
* Flatbuffers Version 23.1.20 * Fix warnings * Fix warnings
This commit is contained in:
@@ -278,7 +278,7 @@ static std::string GenerateDocumentation(const BinaryRegion ®ion,
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::setw(output_config.largest_type_string) << std::left;
|
||||
ss << std::setw(static_cast<int>(output_config.largest_type_string)) << std::left;
|
||||
ss << GenerateTypeString(region);
|
||||
s += ss.str();
|
||||
}
|
||||
@@ -293,7 +293,7 @@ static std::string GenerateDocumentation(const BinaryRegion ®ion,
|
||||
const std::string value = ToValueString(region, binary, output_config);
|
||||
|
||||
std::stringstream ss;
|
||||
ss << std::setw(output_config.largest_value_string) << std::left;
|
||||
ss << std::setw(static_cast<int>(output_config.largest_value_string)) << std::left;
|
||||
ss << value.substr(0, output_config.max_bytes_per_line);
|
||||
s += ss.str();
|
||||
|
||||
@@ -301,7 +301,7 @@ static std::string GenerateDocumentation(const BinaryRegion ®ion,
|
||||
value.substr(std::min(output_config.max_bytes_per_line, value.size()));
|
||||
} else {
|
||||
std::stringstream ss;
|
||||
ss << std::setw(output_config.largest_value_string) << std::left;
|
||||
ss << std::setw(static_cast<int>(output_config.largest_value_string)) << std::left;
|
||||
ss << ToValueString(region, binary, output_config);
|
||||
s += ss.str();
|
||||
}
|
||||
|
||||
@@ -52,14 +52,14 @@ enum class BinaryRegionType {
|
||||
template<typename T>
|
||||
static inline std::string ToHex(T i, size_t width = sizeof(T)) {
|
||||
std::stringstream stream;
|
||||
stream << std::hex << std::uppercase << std::setfill('0') << std::setw(width)
|
||||
stream << std::hex << std::uppercase << std::setfill('0') << std::setw(static_cast<int>(width))
|
||||
<< i;
|
||||
return stream.str();
|
||||
}
|
||||
|
||||
// Specialized version for uint8_t that don't work well with std::hex.
|
||||
static inline std::string ToHex(uint8_t i) {
|
||||
return ToHex(static_cast<int>(i), 2);
|
||||
return ToHex<int>(static_cast<int>(i), 2);
|
||||
}
|
||||
|
||||
enum class BinaryRegionStatus {
|
||||
|
||||
@@ -655,7 +655,7 @@ class CSharpGenerator : public BaseGenerator {
|
||||
// Force compile time error if not using the same version runtime.
|
||||
code += " public static void ValidateVersion() {";
|
||||
code += " FlatBufferConstants.";
|
||||
code += "FLATBUFFERS_23_1_4(); ";
|
||||
code += "FLATBUFFERS_23_1_20(); ";
|
||||
code += "}\n";
|
||||
|
||||
// Generate a special accessor for the table that when used as the root
|
||||
|
||||
@@ -683,7 +683,7 @@ class JavaGenerator : public BaseGenerator {
|
||||
// Force compile time error if not using the same version runtime.
|
||||
code += " public static void ValidateVersion() {";
|
||||
code += " Constants.";
|
||||
code += "FLATBUFFERS_23_1_4(); ";
|
||||
code += "FLATBUFFERS_23_1_20(); ";
|
||||
code += "}\n";
|
||||
|
||||
// Generate a special accessor for the table that when used as the root
|
||||
|
||||
@@ -524,7 +524,7 @@ class KotlinGenerator : public BaseGenerator {
|
||||
// runtime.
|
||||
GenerateFunOneLine(
|
||||
writer, "validateVersion", "", "",
|
||||
[&]() { writer += "Constants.FLATBUFFERS_23_1_4()"; },
|
||||
[&]() { writer += "Constants.FLATBUFFERS_23_1_20()"; },
|
||||
options.gen_jvmstatic);
|
||||
|
||||
GenerateGetRootAsAccessors(namer_.Type(struct_def), writer, options);
|
||||
|
||||
@@ -1840,7 +1840,7 @@ class SwiftGenerator : public BaseGenerator {
|
||||
}
|
||||
|
||||
std::string ValidateFunc() {
|
||||
return "static func validateVersion() { FlatBuffersVersion_23_1_4() }";
|
||||
return "static func validateVersion() { FlatBuffersVersion_23_1_20() }";
|
||||
}
|
||||
|
||||
std::string GenType(const Type &type,
|
||||
|
||||
Reference in New Issue
Block a user